diff --git a/.ripr/traceability.toml b/.ripr/traceability.toml index e512a31b478..095c0568c62 100644 --- a/.ripr/traceability.toml +++ b/.ripr/traceability.toml @@ -2159,6 +2159,7 @@ tests = [ "crates/ripr/src/output/sarif.rs::tests::sarif_projects_python_repair_card_properties", "xtask/src/main.rs::tests::dogfood_language_preview_scenarios_cover_projection_boundaries", "xtask::tests::dogfood_real_repair_attempt_receipts_are_checked", + "xtask::tests::dogfood_python_real_repo_eval_receipts_are_checked", ] fixtures = [ "fixtures/python/basic", @@ -2212,6 +2213,7 @@ fixtures = [ "fixtures/first_successful_pr/python-field-gap", "fixtures/first_successful_pr/python-output-gap", "fixtures/real-repair-attempts", + "fixtures/python-real-repo-evals", ] code = [ "crates/ripr/src/analysis/language/python.rs", @@ -2281,6 +2283,7 @@ metrics = [ "language_adapter_python_swarm_queue_stale_packets", "language_adapter_python_gap_receipt_from_check_output", "language_adapter_python_real_repair_attempt_receipt", + "language_adapter_python_real_repo_eval_receipt", "language_adapter_python_pilot_first_use_path", "language_adapter_python_first_pr_start_here_path", "language_adapter_python_static_limit_stop_reasons", @@ -4062,6 +4065,7 @@ tests = [ "xtask::tests::dogfood_surface_projection_alignment_covers_missing_receipt_route_quality", "xtask::tests::dogfood_real_repair_attempt_receipts_are_checked", "xtask::tests::dogfood_real_repair_attempt_rejects_movement_contradictions", + "xtask::tests::dogfood_python_real_repo_eval_receipts_are_checked", "xtask::tests::first_successful_pr_corpus_reports_outcome_receipt_drift", "crates/ripr/src/output/outcome.rs::tests::targeted_test_outcome_python_preview_fixture_matches_expected_receipts", "crates/ripr/src/output/outcome.rs::tests::targeted_test_outcome_python_return_value_fixture_matches_expected_receipts", @@ -4074,6 +4078,7 @@ fixtures = [ "fixtures/actionable-gap-outcomes-corpus", "fixtures/surface-projection-alignment", "fixtures/real-repair-attempts", + "fixtures/python-real-repo-evals", "fixtures/first_successful_pr/python-preview-gap/inputs/reports/before-check.json", "fixtures/first_successful_pr/python-preview-gap/inputs/reports/after-check.json", "fixtures/first_successful_pr/python-preview-gap/inputs/reports/no-path-check.json", @@ -4162,6 +4167,7 @@ metrics = [ "blocked_state_route_examples", "top_limitation_routes", "real_repair_attempt_receipts", + "language_adapter_python_real_repo_eval_receipt", ] [[behavior]] diff --git a/CHANGELOG.md b/CHANGELOG.md index 0668bab9ac3..69ec2baedc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,11 @@ are scoped or reviewed. ## Unreleased +- Added a Python real-repo eval corpus with a tiny controlled pytest scratch + repo receipt: RIPR emits the predicate-boundary repair card, a human-run + focused pytest command passes, and `ripr outcome` closes the canonical Python + gap. This is still preview/advisory evidence; normal pytest app, API, + CLI/tooling, and mixed-repo dogfood remain outstanding before promotion. - Added a repo-local Python repair-routing dogfood receipt row for a test-only packet that strengthens the preview pricing test, forbids the production Python source file, passes the focused pytest verify command, and diff --git a/docs/CAPABILITY_MATRIX.md b/docs/CAPABILITY_MATRIX.md index 5050fb30adf..5f315e88c82 100644 --- a/docs/CAPABILITY_MATRIX.md +++ b/docs/CAPABILITY_MATRIX.md @@ -36,7 +36,7 @@ Status values: | Analysis modes | `alpha` | `RIPR-SPEC-0001` | `crates/ripr/src/analysis/workspace/select.rs` mode scope tests, `operator_mode_tiers_are_pinned_for_defaults_first_adoption` pins `instant`, `draft`, `fast`, `deep`, and `ready` scopes, `docs/CONFIGURATION.md` maps fast, normal/default, and deep operator stances to concrete modes | `reports/operator-cockpit` | runtime and scope by mode | | LSP diagnostics | `alpha` | `RIPR-SPEC-0001`, `RIPR-SPEC-0046` | tower-lsp-server sidecar, stable diagnostic data payload, related test diagnostic information, diagnostic-targeted context action, diagnostic hover details, serialized refresh generations, VS Code status bar and `ripr: Show Status` path for disabled config, server resolution, workspace detection, server unavailable, queued/running/complete/stale/failed refreshes, and no-actionable-seam states, intent-titled diagnostic actions for inspect, write targeted test, agent handoff, verify after test, review receipt, and refresh analysis; when `target/ripr/reports/gap-decision-ledger.json` exists, LSP publishes only `projection_eligibility.lsp_diagnostic` GapRecord diagnostics with structured `gap_id`, repair route, anchor, and verification command payloads | `maintenance` | diagnostics carry finding/probe metadata, explicit GapRecord repair payloads, editor status names saved-workspace analysis state, and editor actions target the selected finding or gap | | Editor actionable gap queue | `alpha` | `RIPR-SPEC-0055` | `RIPR-PROP-0013`, `RIPR-SPEC-0055`, `ADR-0017`, and `plans/editor-actionable-gap-queue/implementation-plan.md` define the closed source-of-truth stack; LSP and VS Code tests validate `actionable-gaps` artifacts, Show Status queue state, Copy Current Repair Packet, and Copy Repo Gap Map; `fixtures/editor_actionable_gap_queue` pins top-gap, no-action, report-only, static-limit, stale, wrong-root, malformed, receipt-improved, and receipt-unchanged states; [Editor actionable gap queue](EDITOR_ACTIONABLE_GAP_QUEUE.md) documents the local queue workflow and non-claims; [dogfood receipts](handoffs/2026-05-20-editor-actionable-gap-queue-receipts.md) record actionable, no-action, fail-closed, receipt, and preview-boundary proof; [closeout](handoffs/2026-05-20-editor-actionable-gap-queue-closeout.md) records validation and remaining limits | `maintenance` | editor_actionable_gap_queue_available, editor_actionable_gap_queue_top_gap_ready, editor_actionable_gap_queue_no_action, editor_actionable_gap_queue_report_only, editor_actionable_gap_queue_static_limit_only, editor_actionable_gap_queue_stale, editor_actionable_gap_queue_wrong_root, editor_actionable_gap_queue_malformed, editor_actionable_gap_queue_repair_packet_available, editor_actionable_gap_queue_repo_map_available, editor_actionable_gap_queue_actions_suppressed_unsafe_state, editor_actionable_gap_queue_receipt_improved, editor_actionable_gap_queue_receipt_unchanged | -| RIPR swarm repair loop | `alpha` | `RIPR-SPEC-0057`, `RIPR-SPEC-0058` | `RIPR-PROP-0014` explains why swarm work starts as a bounded repair loop over actionable canonical packets, `RIPR-SPEC-0057` defines the repair-loop contract, `RIPR-SPEC-0058` defines the external-agent handoff contract with packet-only input, operator review, patch/receipt metadata, and no provider SDK or autonomous merge, `cargo xtask ripr-swarm plan --top ` writes `swarm-plan.{json,md}` with swarm-ready packets, blocked packets, missing verify/receipt buckets, static-limitation blocking, high-confidence counts, and must-not-infer guardrails, `cargo xtask ripr-swarm attempt --packet --dry-run` prints bounded packet context without editing files or running commands, `cargo xtask ripr-swarm attempt-ledger` writes `swarm-attempt-ledger.{json,md}` with durable attempt ids, packet/canonical ids, actor kind, receipt path, verify/receipt commands, before/after state, outcome, timestamp, latest-attempt projection, attempt-history summary, and orphaned receipts, `cargo xtask ripr-swarm readiness` writes blocked-state route examples, durable attempt-history summary, and field-level blocker next actions, `docs/RIPR_SWARM_HUMAN_WORKFLOW.md` documents the human/operator loop from packet selection through dry-run, repair, verify, receipt, and outcomes, `docs/handoffs/2026-05-20-0.7-swarm-repair-loop-dogfood.md` records live audit timeout handling with fail-closed packet suppression, fixture-backed packet planning, ready and static-limit dry-run attempts, verify/receipt command separation, and outcome joins for not-attempted, improved, unchanged, and orphaned receipt states, `docs/handoffs/2026-05-20-0.7-release-readiness-closeout.md` accepts the live swarm-repo audit timeout as a bounded 0.7 limitation, keeps the loop advisory/dry-run-first, and authorizes source promotion before source release proof, `fixtures/swarm-plan-packet-corpus` pins ready boundary/error/output packets plus static-limitation, missing verify, missing receipt, and missing must-not-change blocking cases, and `fixtures/actionable-gap-outcomes-corpus` pins not-attempted, receipt-present, improved, unchanged, regressed, resolved, attempted-without-receipt, and orphaned-receipt outcome joins without editing files, running tests, calling providers, generating tests, creating receipts, running mutation testing, changing PR/CI rendering, changing LSP/editor behavior, changing gates, or changing public badges | `analysis/related-test-ranking-audit-fixes` | swarm_ready_packets, swarm_blocked_packets, swarm_missing_verify_command, swarm_missing_receipt_command, swarm_static_limitation_packets, swarm_high_confidence_packets, swarm_attempt_ledger_attempts_total, swarm_attempt_history_attempts_total, swarm_attempt_history_durable_attempts_total, swarm_attempt_history_evidence_unchanged, swarm_attempt_history_attempted_no_receipt, swarm_attempt_history_expected_unchanged, swarm_attempted_packets, swarm_verified_improved, swarm_verified_unchanged, swarm_verified_regressed, swarm_failed_to_apply, swarm_orphaned_receipts, blocked_state_routes, blocked_state_route_examples, swarm_missing_allowed_edit_surface, swarm_missing_raw_evidence_refs | +| RIPR swarm repair loop | `alpha` | `RIPR-SPEC-0057`, `RIPR-SPEC-0058` | `RIPR-PROP-0014` explains why swarm work starts as a bounded repair loop over actionable canonical packets, `RIPR-SPEC-0057` defines the repair-loop contract, `RIPR-SPEC-0058` defines the external-agent handoff contract with packet-only input, operator review, patch/receipt metadata, and no provider SDK or autonomous merge, `cargo xtask ripr-swarm plan --top ` writes `swarm-plan.{json,md}` with swarm-ready packets, blocked packets, missing verify/receipt buckets, static-limitation blocking, high-confidence counts, and must-not-infer guardrails, `cargo xtask ripr-swarm attempt --packet --dry-run` prints bounded packet context without editing files or running commands, `cargo xtask ripr-swarm attempt-ledger` writes `swarm-attempt-ledger.{json,md}` with durable attempt ids, packet/canonical ids, actor kind, receipt path, verify/receipt commands, before/after state, outcome, timestamp, latest-attempt projection, attempt-history summary, and orphaned receipts, `cargo xtask ripr-swarm readiness` writes blocked-state route examples, durable attempt-history summary, and field-level blocker next actions, `docs/RIPR_SWARM_HUMAN_WORKFLOW.md` documents the human/operator loop from packet selection through dry-run, repair, verify, receipt, and outcomes, `docs/handoffs/2026-05-20-0.7-swarm-repair-loop-dogfood.md` records live audit timeout handling with fail-closed packet suppression, fixture-backed packet planning, ready and static-limit dry-run attempts, verify/receipt command separation, and outcome joins for not-attempted, improved, unchanged, and orphaned receipt states, `docs/handoffs/2026-05-20-0.7-release-readiness-closeout.md` accepts the live swarm-repo audit timeout as a bounded 0.7 limitation, keeps the loop advisory/dry-run-first, and authorizes source promotion before source release proof, `fixtures/swarm-plan-packet-corpus` pins ready boundary/error/output packets plus static-limitation, missing verify, missing receipt, and missing must-not-change blocking cases, `fixtures/actionable-gap-outcomes-corpus` pins not-attempted, receipt-present, improved, unchanged, regressed, resolved, attempted-without-receipt, and orphaned-receipt outcome joins, and `fixtures/python-real-repo-evals` records a tiny controlled Python repair-card, verify, and closed outcome receipt without editing files, running tests, calling providers, generating tests, creating receipts, running mutation testing, changing PR/CI rendering, changing LSP/editor behavior, changing gates, or changing public badges | `analysis/related-test-ranking-audit-fixes` | swarm_ready_packets, swarm_blocked_packets, swarm_missing_verify_command, swarm_missing_receipt_command, swarm_static_limitation_packets, swarm_high_confidence_packets, swarm_attempt_ledger_attempts_total, swarm_attempt_history_attempts_total, swarm_attempt_history_durable_attempts_total, swarm_attempt_history_evidence_unchanged, swarm_attempt_history_attempted_no_receipt, swarm_attempt_history_expected_unchanged, swarm_attempted_packets, swarm_verified_improved, swarm_verified_unchanged, swarm_verified_regressed, swarm_failed_to_apply, swarm_orphaned_receipts, blocked_state_routes, blocked_state_route_examples, swarm_missing_allowed_edit_surface, swarm_missing_raw_evidence_refs, language_adapter_python_real_repo_eval_receipt | | Lane 1 canonical actionability contract | `alpha` | `RIPR-SPEC-0061` | `RIPR-SPEC-0061` defines the rule that actionable means a safe bounded repair route with canonical identity, repair kind, target shape, verify command, receipt command, confidence, must-not-change boundaries, and raw evidence references; `RIPR-SPEC-0021` defines canonical item identity, gap state, repair route, static limitations, raw spans, and receipt command compatibility; `RIPR-SPEC-0056` keeps public projection deny-by-default when canonical identity, repair route, verify, receipt, freshness, or safety checks are missing; `RIPR-SPEC-0057` blocks swarm-ready ranking for missing verify command, missing receipt command, static limitations, and missing must-not-change boundaries; `test_grip_evidence::given_boundary_owner_call_when_input_operand_is_iterator_local_then_activation_is_static_limitation` keeps `idx >= offset` style local/iterator operands as named static limitations without invented candidate values; `test_grip_evidence::given_boundary_owner_call_when_input_operand_is_direct_parameter_alias_then_observed_values_are_resolved` allows exact same-function local aliases of owner parameters to use the original owner-call argument; `test_grip_evidence::given_boundary_owner_call_when_input_operand_is_computed_local_then_activation_stays_static_limitation` keeps computed local operands as named limitations; `evidence_record::evidence_record_normalizes_static_limitation_categories` maps `activation_owner_call_absent` to `analysis/owner-call-absence-triage`, splits assertion-target affinity owner-call absence as `activation_owner_call_absent_assertion_target_affinity` routed to `analysis/assertion-target-affinity-owner-call-tracing`, splits call-presence target affinity owner-call absence as `activation_owner_call_absent_call_presence_target_affinity` routed to `analysis/call-presence-target-affinity-owner-call-tracing`, splits other affinity-only owner-call absence as `activation_owner_call_absent_affinity_only` routed to `analysis/related-test-affinity-owner-call-tracing`, splits same-file-only owner-call absence as `activation_owner_call_absent_same_file_only` routed to `analysis/same-file-owner-call-tracing`, and maps `activation_boundary_input_unresolved` to analyzer repair routes; `lane1_actionable_gap_packets_mark_public_projection_ready_with_receipt` validates emitted public packets carry `target_test_shape`, `receipt_command`, confidence, raw evidence references, and `must_not_change`; LSP actionable-gaps validation rejects public packets missing those fields; `test_grip_evidence::given_call_presence_when_unique_test_support_helper_calls_owner_then_activation_is_yes` reduces `activation_owner_call_unresolved` for globally unique test-support helper owner calls; `test_grip_evidence::given_call_presence_when_duplicate_test_support_helpers_share_owner_then_activation_is_yes` reduces the same limitation when duplicate support-helper names share a common owner; `test_grip_evidence::given_call_presence_when_ambiguous_support_helper_is_module_qualified_then_activation_is_yes` reduces the limitation when an explicit module-qualified support-helper call disambiguates mixed helper names; `test_grip_evidence::given_call_presence_when_crate_qualified_support_helper_calls_owner_then_activation_is_yes` keeps the explicit qualified-helper route working for crate-qualified calls; `test_grip_evidence::given_call_presence_when_test_local_helper_wraps_owner_call_in_option_then_activation_is_yes` and `test_grip_evidence::given_call_presence_when_test_local_helper_wraps_owner_call_in_result_then_activation_is_yes` allow inert `Some`/`Ok` wrappers around direct helper owner calls; `test_grip_evidence::given_call_presence_when_test_local_helper_unwraps_owner_call_result_then_activation_is_yes` and `test_grip_evidence::given_call_presence_when_test_local_helper_expects_owner_call_result_then_activation_is_yes` allow immediate `unwrap`/`expect` method wrappers around result-returning direct helper owner calls; `test_grip_evidence::given_call_presence_when_helper_wraps_owner_call_with_non_container_call_then_activation_stays_unknown` keeps non-container wrappers limited; `test_grip_evidence::given_call_presence_when_qualified_support_helper_targets_other_owner_then_no_helper_relation` and `test_grip_evidence::given_qualified_support_helper_only_in_comment_or_string_then_call_match_is_ignored` keep qualified-helper matching deny-by-default; `test_grip_evidence::given_call_presence_when_test_support_helper_name_is_ambiguous_then_activation_stays_unknown` keeps ambiguous helper names limited; `test_grip_evidence::given_call_presence_when_integration_test_calls_production_wrapper_then_activation_is_yes` reduces owner-call absence when an integration test calls an unambiguous same-package production one-hop wrapper; `test_grip_evidence::given_call_presence_when_multi_owner_production_wrapper_has_target_affinity_then_activation_is_yes` reduces call-presence target-affinity owner-call absence when a same-package wrapper directly calls multiple owners and the assertion mentions the matching call target; `test_grip_evidence::given_call_presence_when_multi_owner_wrapper_asserts_other_target_then_activation_stays_unknown` keeps the route target-scoped; `test_grip_evidence::given_call_presence_when_crate_qualified_wrapper_has_target_affinity_then_activation_is_yes` reduces call-presence target-affinity owner-call absence when a production wrapper calls an indexed owner through an explicit `crate::module::owner(...)` path and the assertion mentions the matching call target; `test_grip_evidence::given_call_presence_when_crate_qualified_wrapper_asserts_other_target_then_activation_stays_unknown` and `test_grip_evidence::given_call_presence_when_bare_qualified_wrapper_has_target_affinity_then_activation_stays_unknown` keep the route target-scoped and crate-qualified only; `test_grip_evidence::given_value_insensitive_seam_when_multi_owner_wrapper_has_target_affinity_then_activation_is_yes` reduces assertion-target affinity owner-call absence for value-insensitive seams when a same-package wrapper directly calls multiple owners and the assertion mentions the matching target token; `test_grip_evidence::given_value_insensitive_seam_when_multi_owner_wrapper_asserts_other_target_then_activation_stays_unknown` keeps that route target-scoped; `test_grip_evidence::given_call_presence_when_direct_owner_call_uses_turbofish_then_activation_is_yes` and `analysis::extract::calls::call_extraction_recognizes_turbofish_function_calls` reduce `activation_owner_call_unresolved` for direct generic owner calls without inventing activation values; `test_grip_evidence::given_call_presence_when_direct_owner_call_has_space_before_paren_then_activation_is_yes` reduces `activation_owner_call_unresolved` for direct owner calls with whitespace before the call delimiter without inventing activation values; `test_grip_evidence::given_call_presence_when_production_wrapper_name_is_ambiguous_then_activation_stays_unknown` keeps duplicate production wrapper names with different owner-call targets limited; `ripr_swarm_attempt_ledger_preserves_prior_attempts_and_highlights_latest` and `ripr_swarm_readiness_consumes_attempt_ledger_counts` validate durable attempt history and readiness consumption while analysis/call-presence-target-affinity-owner-call-tracing remains the next sampled work-queue proof | `analysis/call-presence-target-affinity-owner-call-tracing` | finding_alignment_actionable_items_total, finding_alignment_static_limitation_total, finding_alignment_canonical_items_without_repair_route, finding_alignment_canonical_items_without_verify_command, lane1_actionable_gap_packets, swarm_ready_packets, swarm_missing_verify_command, swarm_static_limitation_packets | | Actionable surface translation | `alpha` | `RIPR-SPEC-0059` | `RIPR-PROP-0016` records the cross-surface product rationale, `RIPR-SPEC-0059` defines the first-screen translation contract for badge, PR evidence, editor status, swarm dry-run, and outcome/trend surfaces, `RIPR-PLAN-0059` records the completed PR sequence and proof commands, badge-basis output explains unresolved actionable static repair gaps with `canonical_actionable_gap` as the public basis, PR summary output starts with an advisory actionable repair front panel before raw path inventory, VS Code Show Status starts with an editor repair cockpit over current actionable state, top repair, verify command, receipt state, and fail-closed next action, `ripr-swarm attempt --dry-run` starts with a copy-ready operator packet and fails closed on prose-only edit targets, actionable-gap outcomes and evidence-quality trend reports include `movement_front` sections while keeping receipt-linked movement bounded to outcome artifacts, and [closeout](handoffs/2026-05-23-actionable-surface-translation-closeout.md) records validation, remaining advisory/static limits, and no selected successor | `maintenance` | repo_actionable_queue_count, pr_local_actionable_gap_count, actionable_gaps_new, actionable_gaps_resolved, actionable_gaps_blocked_static_limited, actionable_receipts_missing, actionable_receipts_orphaned, actionable_repairs_attempted_unchanged, swarm_ready_packets, outcome_delta_improved, outcome_delta_unchanged, outcome_delta_regressed, outcome_delta_resolved | | Parser-backed syntax facts | `alpha` | `RIPR-SPEC-0001` | ADR 0006, ra_ap_syntax dependency, RustSyntaxAdapter parser adapter, fixture/golden output stability, module-qualified and impl-qualified owner symbols, parser-backed probe shape facts, probe-relative oracle kind and strength, typed local flow sink facts, negative and metamorphic fixture baseline | `test-efficiency-duplicate-discriminator-v1` | syntax extraction parity | @@ -84,7 +84,7 @@ Status values: | Language-aware generated CI grouping | `alpha` | `RIPR-SPEC-0038` | `crates/ripr/src/cli/commands.rs` generated GitHub workflow summary reads enabled languages through public `ripr doctor`, keeps the language grouping section hidden for Rust-only config, and groups TypeScript/JavaScript/Python advisory artifact entries, preview-status counts, classifications, static-limit kinds, actionability states/categories, repair-packet-ready counts, and `gate_impact = none` only when preview adapters are configured; TypeScript-family grouping includes separately labeled JavaScript preview evidence when TypeScript preview is configured; the summary states that preview-language groups are advisory presentation only and that `ripr gate evaluate` remains pass/fail authority when explicitly configured; generated workflow and CLI smoke tests pin the opt-in grouping guard, Rust-default boundary, and report artifact paths; `docs/LANGUAGE_ADAPTER_PREVIEW.md` documents generated-CI grouping and the gate-authority boundary; `cargo xtask dogfood` now checks that generated-CI cockpit receipts treat preview language grouping, JavaScript grouping, actionability summaries, and gate impact none as checked while preserving advisory defaults; the Campaign 27 closeout records the Rust-default and gate-authority boundary | `maintenance` | generated_pr_ci_language_groups, generated_pr_ci_preview_language_groups, generated_pr_ci_preview_language_javascript_group, generated_pr_ci_preview_actionability_groups, generated_pr_ci_preview_gate_impact_none, generated_pr_ci_rust_default_unchanged, generated_pr_ci_advisory_summaries | | Repository config | `alpha` | `RIPR-SPEC-0007` | `crates/ripr/src/config.rs` repo-root `ripr.toml` loader, CLI/LSP precedence tests, `ripr doctor` config visibility, configured oracle policy, severity, suppressions path, seam diagnostics defaults, `ripr init` defaults-first config generation, `generated_init_config_matches_builtin_defaults` pins missing config and generated `ripr.toml` policy equivalence, repo-mode production filters exclude repository automation and non-production trees while fixture roots still work, `ripr.toml.example` | `reports/operator-cockpit` | configured analysis mode, oracle policy, severity, suppressions, and seam diagnostics apply across CLI, reports, and LSP | | TypeScript preview static facts | `alpha` | `RIPR-SPEC-0027` | `RIPR-SPEC-0027` accepts the TypeScript-family preview static-facts contract, `docs/lanes/LANE_1_TYPESCRIPT_PREVIEW_COMPLETION.md` records current implementation and missing completion slices, `plans/typescript-preview-completion/implementation-plan.md` sequences the bounded completion PRs, JavaScript findings emitted by the TypeScript-family adapter are separately labeled `language = javascript` while remaining preview evidence, TypeScript fixtures cover boundary gap, strong oracle, return-value shape, mocked-module static limit, awaited rejected promise, effect probe shapes, TSX parsing, JavaScript `.js` and `.jsx` labeling, disabled TypeScript config, parser-error `unsupported_syntax`, static-limit taxonomy for dynamic dispatch, metaprogramming, missing import graph, decorator indirection, mocked modules, and unsupported syntax, owner-kind projection for functions, arrow functions, methods, class methods, TSX/JSX components, module initializers, mixed Rust plus TypeScript output, Jest/Vitest assertion facts for nested `describe`, `test.each`, `it.each`, exact-value, async `resolves`, mock interaction, snapshot, and smoke-only evidence while keeping weak oracles weak, related-test matching for direct owner calls, relative named import aliases, namespace import member calls, and uncertainty-only same-stem, describe-name, and test-name proximity while excluding unrelated imports, type-only imports, object methods, strings, comments, and partial owner-token names, probe facts for predicate, return-value, error-path, field/object construction, side-effect, mock-interaction, and log/output shapes while suppressing discriminator candidates for ambiguous const expressions and computed-member calls, strict actionability evidence that fails closed with `gap_state`, `actionability_category`, `why_not_actionable`, `repair_route`, missing actionability fields, and raw preview evidence refs instead of emitting repair packets, structured `preview_actionability` projection through check JSON, human output, GitHub annotations, and diff-scoped SARIF properties while leaving repair-packet, gate, badge, baseline, and RIPR Zero surfaces unchanged, LSP diagnostic data, hover preview actionability context, and inspect-context code actions carry the same preview context while incomplete preview items stay bounded to inspect and refresh actions without repair-packet, verify, receipt, edit, or generated-test actions, and generated CI groups TypeScript-family preview evidence as separate TypeScript and JavaScript advisory groups with actionability summaries, repair-packet-ready counts, static-limit context, and gate impact none; `cargo xtask dogfood` checks TypeScript preview labels, disabled-language behavior, static limits, no cross-language related-test routing, and TypeScript-family repair-loop receipts for advisory boundary proof, weak-oracle downgrades, skipped incomplete-packet routes, static limitations, and unchanged already-observed evidence while preserving preview/advisory boundaries and `repair_packet_ready=false`; language_repair_route_quality reports TypeScript and JavaScript preview outcomes by language and repair kind without promoting preview evidence into public packets, badge inputs, gates, baseline authority, or RIPR Zero; `docs/handoffs/2026-05-30-typescript-preview-completion-closeout.md` records the support-tier decision that TypeScript and JavaScript remain preview | `maintenance` | language_adapter_typescript_findings_preview, language_adapter_typescript_owner_function, language_adapter_typescript_owner_method, language_adapter_typescript_owner_class_method, language_adapter_typescript_owner_arrow_function, language_adapter_typescript_owner_component, language_adapter_typescript_oracle_exact_value, language_adapter_typescript_oracle_error_path, language_adapter_typescript_oracle_side_effect, language_adapter_typescript_oracle_snapshot_weak, language_adapter_typescript_oracle_smoke, language_adapter_typescript_related_imported_owner_call, language_adapter_typescript_probe_predicate, language_adapter_typescript_probe_return_value, language_adapter_typescript_probe_error_path, language_adapter_typescript_probe_field_construction, language_adapter_typescript_probe_call_side_effect, language_adapter_typescript_probe_mock_interaction, language_adapter_typescript_probe_ambiguous_suppressed, language_adapter_typescript_static_limit_dynamic_dispatch, language_adapter_typescript_static_limit_metaprogramming, language_adapter_typescript_static_limit_missing_import_graph, language_adapter_typescript_static_limit_decorator_indirection, language_adapter_typescript_static_limit_mocked_module, language_adapter_typescript_static_limit_unsupported_syntax, language_adapter_typescript_actionability_advisory, language_adapter_typescript_actionability_static_limitation, language_adapter_typescript_actionability_already_observed, language_adapter_typescript_lsp_preview_actionability_context, language_adapter_typescript_ci_preview_grouping, language_adapter_typescript_preview_repair_loop_dogfood, language_adapter_typescript_route_quality_by_language, language_adapter_javascript_route_quality_by_language | -| Python preview static facts | `alpha` | `RIPR-SPEC-0028` | Python preview adapter runs only when `[languages]` enables `python`; JSON and human goldens show `language = "python"` and `language_status = "preview"`; fixtures cover owner/test, assertion/oracle, probe, related-test, and static-limit families including `dynamic_dispatch`, dynamic import through `missing_import_graph`, `decorator_indirection`, `mocked_module` with patch and monkeypatch syntax, `opaque_custom_assertion_helper`, `property_based_test`, `unresolved_pytest_fixture`, `missing_import_graph`, `metaprogramming` including metaclass declarations, and `unsupported_syntax`; non-static-limit Python findings carry stable canonical gap IDs across JSON, human, SARIF, GitHub annotation, LSP diagnostic/hover, and context-packet surfaces while static-limit findings fail closed as `static_unknown` with typed stop reasons; non-static Python findings carry family-specific RIPR infection/propagation evidence and selected repair-class missing discriminators for predicate boundary, return value, exception path, field/object value, and output/log/call effects; exact exception-message observers through `pytest.raises(..., match=...)` and `assertRaisesRegex(...)` are strong exception evidence while broad exception observers stay weak; ranking now puts direct repairable weak Python findings ahead of observed, no-path, heuristic-only, and static-limit preview findings; direct weak pytest/unittest findings carry suggested test placement, verify commands, and verify-command confidence; direct weak Python findings with canonical gaps, concrete missing discriminators, placement, and verify commands now carry `python_repair_card` output with changed owner, changed behavior, current test evidence, test shape, suggested assertion, suggested location, verify command, preview/advisory authority boundary, receipt status, stop conditions, and limits; `ripr pilot` can project that top Python repair card into `pilot-summary.{json,md}` and terminal first-use output for Python diff runs; LSP GapRecord code actions accept bounded `pytest ...` and `python -m unittest ...` verify commands for Python repair cards, copy a bounded Python agent packet for current actionable repairable records, copy a full repair card for safe target-file routes with a current validated GapRecord freshness cue, copy a fail-fast pytest skeleton, and open the target test file when the repair route has a bare test name; `ripr first-pr` can select Python preview GapRecords from a gap decision ledger, write preview-limited `start-here.{json,md}` for Python project roots without Cargo, recover missing Python-only gap ledgers through `ripr check --json` plus `reports gap-ledger --check-output` instead of Rust repo-exposure, and accept `--check-output ` to materialize that ledger before selecting the start-here repair; `reports gap-ledger --check-output` derives Python preview GapRecords from repair cards, synthesizes receipt commands for check-output before/after snapshots when raw cards lack one, and derives report-only `StaticLimitation` GapRecords from Python `static_limit_kind` findings without making them agent-packet eligible; `ripr outcome` can compare those before/after check snapshots by canonical Python gap ID, `first_successful_pr/python-preview-gap` pins closed, unchanged, opened, strengthened, and weakened preview receipts, `first_successful_pr/python-return-gap` pins non-boundary return-value closure, `first_successful_pr/python-exception-gap` pins non-boundary exception-path closure, `first_successful_pr/python-field-gap` pins non-boundary field/object closure, and `first_successful_pr/python-output-gap` pins non-boundary output/log closure; `agent packet --gap-ledger` exports bounded packets with allowed files, forbidden files, conflict groups, missing discriminators, verify commands, receipt commands/status, and stop conditions, and `ripr swarm queue --language python` ranks packetable Python GapRecords into conflict-grouped repair work without queuing static limits or no-action records while blocking wrong-root/rootless ledgers and marking receipt-stale or already-closed packets as `blocked_stale` before assignment; heuristic, no-path, and static-limit cases suppress repair guidance until later repair-card contracts can bound them; `cargo xtask dogfood` checks Python preview receipts for `missing_import_graph`, disabled-language behavior, and no cross-language related-test routing; `docs/LANGUAGE_ADAPTER_PREVIEW.md` documents how to enable, read, and roll back Python preview evidence; the Campaign 27 closeout records Python as opt-in preview rather than Rust parity | `cli/python-first-use-path` | `language_adapter_python_findings_preview`, `language_adapter_python_static_limit_*`, `language_adapter_python_canonical_gap_identity`, `language_adapter_python_ripr_evidence_model`, `language_adapter_python_repair_class_*`, `language_adapter_python_repair_guidance_suppressed_non_actionable`, `language_adapter_python_repair_ranking_noise_control`, `language_adapter_python_test_placement_verify`, `language_adapter_python_repair_card_v1`, `language_adapter_python_agent_packet_v1`, `language_adapter_python_swarm_queue_stale_packets`, `language_adapter_python_gap_receipt_from_check_output`, `language_adapter_python_pilot_first_use_path`, `language_adapter_python_pr_summary_repair_card_projection`, `language_adapter_python_lsp_agent_packet_action`, `language_adapter_python_lsp_repair_card_action`, `language_adapter_python_lsp_pytest_skeleton_action`, `language_adapter_python_first_pr_start_here_path`, `language_adapter_python_first_pr_check_output_bridge`, `language_adapter_python_static_limit_stop_reasons`, `language_adapter_python_static_limit_mocked_module`, `language_adapter_python_static_limit_opaque_custom_assertion_helper`, `language_adapter_python_static_limit_property_based_test`, `language_adapter_python_static_limit_unresolved_pytest_fixture` | +| Python preview static facts | `alpha` | `RIPR-SPEC-0028` | Python preview adapter runs only when `[languages]` enables `python`; JSON and human goldens show `language = "python"` and `language_status = "preview"`; fixtures cover owner/test, assertion/oracle, probe, related-test, and static-limit families including `dynamic_dispatch`, dynamic import through `missing_import_graph`, `decorator_indirection`, `mocked_module` with patch and monkeypatch syntax, `opaque_custom_assertion_helper`, `property_based_test`, `unresolved_pytest_fixture`, `missing_import_graph`, `metaprogramming` including metaclass declarations, and `unsupported_syntax`; non-static-limit Python findings carry stable canonical gap IDs across JSON, human, SARIF, GitHub annotation, LSP diagnostic/hover, and context-packet surfaces while static-limit findings fail closed as `static_unknown` with typed stop reasons; non-static Python findings carry family-specific RIPR infection/propagation evidence and selected repair-class missing discriminators for predicate boundary, return value, exception path, field/object value, and output/log/call effects; exact exception-message observers through `pytest.raises(..., match=...)` and `assertRaisesRegex(...)` are strong exception evidence while broad exception observers stay weak; ranking now puts direct repairable weak Python findings ahead of observed, no-path, heuristic-only, and static-limit preview findings; direct weak pytest/unittest findings carry suggested test placement, verify commands, and verify-command confidence; direct weak Python findings with canonical gaps, concrete missing discriminators, placement, and verify commands now carry `python_repair_card` output with changed owner, changed behavior, current test evidence, test shape, suggested assertion, suggested location, verify command, preview/advisory authority boundary, receipt status, stop conditions, and limits; `ripr pilot` can project that top Python repair card into `pilot-summary.{json,md}` and terminal first-use output for Python diff runs; LSP GapRecord code actions accept bounded `pytest ...` and `python -m unittest ...` verify commands for Python repair cards, copy a bounded Python agent packet for current actionable repairable records, copy a full repair card for safe target-file routes with a current validated GapRecord freshness cue, copy a fail-fast pytest skeleton, and open the target test file when the repair route has a bare test name; `ripr first-pr` can select Python preview GapRecords from a gap decision ledger, write preview-limited `start-here.{json,md}` for Python project roots without Cargo, recover missing Python-only gap ledgers through `ripr check --json` plus `reports gap-ledger --check-output` instead of Rust repo-exposure, and accept `--check-output ` to materialize that ledger before selecting the start-here repair; `reports gap-ledger --check-output` derives Python preview GapRecords from repair cards, synthesizes receipt commands for check-output before/after snapshots when raw cards lack one, and derives report-only `StaticLimitation` GapRecords from Python `static_limit_kind` findings without making them agent-packet eligible; `ripr outcome` can compare those before/after check snapshots by canonical Python gap ID, `first_successful_pr/python-preview-gap` pins closed, unchanged, opened, strengthened, and weakened preview receipts, `first_successful_pr/python-return-gap` pins non-boundary return-value closure, `first_successful_pr/python-exception-gap` pins non-boundary exception-path closure, `first_successful_pr/python-field-gap` pins non-boundary field/object closure, and `first_successful_pr/python-output-gap` pins non-boundary output/log closure; `fixtures/python-real-repo-evals/corpus.json` records a tiny controlled pytest scratch-repo repair card, focused verify pass, and closed Python outcome receipt while broader normal-pytest/API/CLI/mixed dogfood remains outstanding; `agent packet --gap-ledger` exports bounded packets with allowed files, forbidden files, conflict groups, missing discriminators, verify commands, receipt commands/status, and stop conditions, and `ripr swarm queue --language python` ranks packetable Python GapRecords into conflict-grouped repair work without queuing static limits or no-action records while blocking wrong-root/rootless ledgers and marking receipt-stale or already-closed packets as `blocked_stale` before assignment; heuristic, no-path, and static-limit cases suppress repair guidance until later repair-card contracts can bound them; `cargo xtask dogfood` checks Python preview receipts for `missing_import_graph`, disabled-language behavior, no cross-language related-test routing, and the Python real-repo eval receipt corpus; `docs/LANGUAGE_ADAPTER_PREVIEW.md` documents how to enable, read, and roll back Python preview evidence; the Campaign 27 closeout records Python as opt-in preview rather than Rust parity | `cli/python-first-use-path` | `language_adapter_python_findings_preview`, `language_adapter_python_static_limit_*`, `language_adapter_python_canonical_gap_identity`, `language_adapter_python_ripr_evidence_model`, `language_adapter_python_repair_class_*`, `language_adapter_python_repair_guidance_suppressed_non_actionable`, `language_adapter_python_repair_ranking_noise_control`, `language_adapter_python_test_placement_verify`, `language_adapter_python_repair_card_v1`, `language_adapter_python_agent_packet_v1`, `language_adapter_python_swarm_queue_stale_packets`, `language_adapter_python_gap_receipt_from_check_output`, `language_adapter_python_real_repo_eval_receipt`, `language_adapter_python_pilot_first_use_path`, `language_adapter_python_pr_summary_repair_card_projection`, `language_adapter_python_lsp_agent_packet_action`, `language_adapter_python_lsp_repair_card_action`, `language_adapter_python_lsp_pytest_skeleton_action`, `language_adapter_python_first_pr_start_here_path`, `language_adapter_python_first_pr_check_output_bridge`, `language_adapter_python_static_limit_stop_reasons`, `language_adapter_python_static_limit_mocked_module`, `language_adapter_python_static_limit_opaque_custom_assertion_helper`, `language_adapter_python_static_limit_property_based_test`, `language_adapter_python_static_limit_unresolved_pytest_fixture` | | Python swarm result ingest | `alpha` | `RIPR-SPEC-0028` | `ripr swarm ingest --result ...` reads one external agent-result artifact, classifies it as `closed`, `partially_improved`, `verify_failed`, `edited_forbidden_file`, `stopped_by_agent`, `stale_packet`, or `uncertain`, flags edits to packet `forbidden_files` before any success claim, treats missing verify evidence as uncertain, and preserves the advisory/no-provider/no-generated-test/no-mutation boundary; `crates/ripr/src/output/swarm_ingest.rs` pins the JSON shape and classification precedence, `crates/ripr/src/cli/commands.rs` exposes the read-only command, `docs/OUTPUT_SCHEMA.md` documents the implemented envelope, and `fixtures/first_successful_pr/python-preview-gap/expected/swarm-ingest/closed.json` pins a Python preview test-only attempt that closes with passing verify evidence plus resolved receipt movement | `python-gap-ledger-closure` | `language_adapter_python_swarm_ingest`, `language_adapter_python_swarm_ingest_forbidden_edit`, `language_adapter_python_swarm_ingest_missing_verify`, `language_adapter_python_swarm_ingest_result_states` | | SARIF and CI policy | `alpha` | `RIPR-SPEC-0008` | SARIF/CI contract defining finding and seam rule IDs, configured severity mapping, suppression visibility, and advisory baseline-policy modes; `crates/ripr/src/output/sarif.rs` renders diff-scoped Finding SARIF and repo-scoped seam SARIF with configured severity, suppression metadata, stable rule IDs, and stable fingerprints; `ripr init --ci github` generates a non-blocking defaults-first GitHub workflow that runs `ripr pilot`, uploads pilot/report/agent/review artifacts, writes a RIPR advisory summary, writes repo badge JSON and Shields artifacts, optionally renders an operator cockpit when the repo-local xtask exists, and gates SARIF rendering/upload behind `RIPR_UPLOAD_SARIF`; `crates/ripr/src/cli/commands.rs::init_generated_github_workflow_matches_smoke_fixture` pins the generated workflow artifact packet, optional SARIF gates, non-blocking posture, and badge outputs; `cargo xtask sarif-policy` compares current SARIF against a baseline and only fails on new warning-level results when explicitly requested; `docs/CI.md` documents the generated workflow shape | `advisory-policy-feedback` | SARIF result counts by rule/level, new configured-warning results, and advisory_ci_workflow_generated | | Public actionable badge counts | `usable alpha` | `RIPR-SPEC-0056` | `docs/BADGE_POLICY.md` defines `canonical_actionable_gap` as the public badge basis; `docs/OUTPUT_SCHEMA.md` Badge Output schema 0.5 documents basis values plus `badge-basis` audit fields; `crates/ripr/src/output/badge/summaries.rs` renders repo badge payloads from unresolved actionable canonical repair items while `badge-basis` preserves seam-native inventory as internal analyzer-health pressure; repo badge native JSON uses `basis: canonical_actionable_gap` by default and `basis: gap_decision_ledger` when supplied; diff badge native JSON remains `basis: finding_exposure`; checked-in `badges/ripr.json` and `badges/ripr-plus.json` are refreshed from generated endpoint artifacts | `campaign/public-badge-projection-realignment` | public badge headline counts unresolved actionable canonical repair items; seam-native inventory is available through `cargo xtask badge-basis --include-seam-classes`, repo-exposure, seam-inventory, and evidence-quality reports, not the public `ripr` / `ripr+` headline | diff --git a/docs/DOGFOODING.md b/docs/DOGFOODING.md index ad7c4651b35..cdf77ce6b64 100644 --- a/docs/DOGFOODING.md +++ b/docs/DOGFOODING.md @@ -21,7 +21,10 @@ fast` against checked fixture diffs, writes actual outputs under `target/ripr/reports/dogfood.json`. It also checks repo-local finding-alignment receipts under `fixtures/finding-alignment-dogfood/` so real RIPR PR examples preserve the Lane 1 split between raw findings, canonical evidence items, and -actionable canonical gaps. +actionable canonical gaps. Python repair-routing eval receipts live under +`fixtures/python-real-repo-evals/`; they record curated scratch or real-repo +repair-card, verify, and outcome evidence without promoting Python beyond its +preview/advisory boundary. ## Dogfooding Rules diff --git a/docs/IMPLEMENTATION_PLAN.md b/docs/IMPLEMENTATION_PLAN.md index 44e2916385c..23a8a510eab 100644 --- a/docs/IMPLEMENTATION_PLAN.md +++ b/docs/IMPLEMENTATION_PLAN.md @@ -51,7 +51,7 @@ than one behavior contract or touches repo shape. | PR Inline Comment Publisher (26) | Make optional durable PR comments safe and explicit by planning, capping, deduplicating, and publishing only changed-line `review-comments` entries when configured. | Complete: spec, fixture corpus, read-only publish plan, generated-CI opt-in wiring, workflow docs, dogfood receipts, and closeout audit are in place. | | Language Adapter Preview (27) | Introduce a language-neutral analysis adapter boundary, keep Rust as the reference adapter, and add syntax-first TypeScript and Python preview adapters that feed the existing RIPR domain, output, LSP, agent, and Lane 4 surfaces without changing Rust behavior or default CI blocking. | Complete: RIPR-PROP-0001 records the adapter design intent, RIPR-SPEC-0026 pins the adapter contract, RIPR-SPEC-0027 pins the TypeScript preview static-fact contract, and RIPR-SPEC-0028 pins the Python preview static-fact contract. TypeScript and Python preview facts are fixture-backed; Lane 3 editor routing landed from RIPR-PROP-0003, RIPR-SPEC-0036, RIPR-SPEC-0037, ADR-0011, and `plans/campaign-27/lane3-editor-preview-routing.md`; generated CI language grouping projects configured preview evidence as advisory-only groups while keeping Rust defaults and gate authority unchanged; `docs/LANGUAGE_ADAPTER_PREVIEW.md` documents the adoption and rollback path; `cargo xtask dogfood` checks TypeScript/Python preview receipts for labels, static limits, disabled-language behavior, and no cross-language related-test routing; the closeout audit records the preview/advisory boundary. | | TypeScript Enablement | Make the completed TypeScript/JavaScript preview surface more useful, precise, repair-card-shaped, and promotion-ready without reopening preview completion or changing advisory authority. | Active successor lane: [TypeScript Enablement](lanes/TYPESCRIPT_ENABLEMENT.md) records that preview completion is closed and future TypeScript work should focus on weak-oracle guidance, false-actionable audits, narrow mock/error payload support, method receiver relation, module initializer guidance, repair-card projection, dogfood, route quality, and an explicit remain-preview or promotion decision. | -| Python Repair Routing (28) | Turn changed Python behavior into bounded test-repair work with project detection, repair cards, verify commands, agent packets, and outcome receipts while keeping Python preview/advisory until dogfood evidence supports promotion. | Active: [RIPR-PROP-0017](proposals/RIPR-PROP-0017-python-repair-routing-lane.md) and [the Python repair-routing plan](../plans/python-repair-routing/implementation-plan.md) define the staged lane. The current slice makes Python before/after receipt evidence and noise-control fixtures fixture-backed: repair cards already project to GapRecords, agent packets, queue items, verify commands, and receipt commands; `ripr swarm ingest` has a Python preview fixture for a test-only closed attempt; `first_successful_pr/python-preview-gap` pins `ripr outcome` JSON/Markdown receipts where the canonical Python gap closes, stays unchanged, opens, strengthens, or weakens across check-output snapshots; `first_successful_pr/python-return-gap`, `python-exception-gap`, `python-field-gap`, and `python-output-gap` pin non-boundary closure from broad to exact evidence; generated Python diffs such as `*_pb2.py`, dynamic import calls such as `importlib.import_module(...)`, decorator indirection, monkeypatch/module patches, unresolved fixtures, property-based tests, opaque custom helpers, and metaclass declarations are pinned as fail-closed limitations or exclusions rather than repair-ready gaps; same-line returned-dict return/field/string signals collapse to one user-facing canonical gap; `fixtures/real-repair-attempts/corpus.json` now records a repo-local Python packet that edits only tests, passes verify evidence, and closes the canonical Python gap through an outcome receipt; and broader normal-pytest/API/CLI/mixed Python dogfood remains the next blocker before any support-tier promotion. | +| Python Repair Routing (28) | Turn changed Python behavior into bounded test-repair work with project detection, repair cards, verify commands, agent packets, and outcome receipts while keeping Python preview/advisory until dogfood evidence supports promotion. | Active: [RIPR-PROP-0017](proposals/RIPR-PROP-0017-python-repair-routing-lane.md) and [the Python repair-routing plan](../plans/python-repair-routing/implementation-plan.md) define the staged lane. The current slice makes Python before/after receipt evidence and noise-control fixtures fixture-backed: repair cards already project to GapRecords, agent packets, queue items, verify commands, and receipt commands; `ripr swarm ingest` has a Python preview fixture for a test-only closed attempt; `first_successful_pr/python-preview-gap` pins `ripr outcome` JSON/Markdown receipts where the canonical Python gap closes, stays unchanged, opens, strengthens, or weakens across check-output snapshots; `first_successful_pr/python-return-gap`, `python-exception-gap`, `python-field-gap`, and `python-output-gap` pin non-boundary closure from broad to exact evidence; generated Python diffs such as `*_pb2.py`, dynamic import calls such as `importlib.import_module(...)`, decorator indirection, monkeypatch/module patches, unresolved fixtures, property-based tests, opaque custom helpers, and metaclass declarations are pinned as fail-closed limitations or exclusions rather than repair-ready gaps; same-line returned-dict return/field/string signals collapse to one user-facing canonical gap; `fixtures/real-repair-attempts/corpus.json` records a repo-local Python packet that edits only tests, passes verify evidence, and closes the canonical Python gap through an outcome receipt; `fixtures/python-real-repo-evals/corpus.json` now records a tiny controlled pytest scratch-repo eval with a Python repair card, focused verify pass, and closed outcome receipt; and broader normal-pytest/API/CLI/mixed Python dogfood remains the next blocker before any support-tier promotion. | | Policy Readiness and Preview Evidence Governance (Lane 2 tracker) | Make policy decisions auditable across stable Rust evidence and preview-language evidence without changing advisory defaults. | Complete: tracker [#755](https://github.com/EffortlessMetrics/ripr/issues/755), readiness reporting, preview evidence policy, waiver aging, suppression health, baseline refresh guardrails, exception ledger convergence, blocking guidance, advisory CI projection, and [closeout audit](handoffs/2026-05-12-policy-readiness-closeout.md) are in place. | | Policy Operations and Promotion Readiness (Lane 2 tracker) | Make policy adoption operational with current safe ceiling, next safe action, blockers to stricter modes, policy history, and read-only promotion packets. | Complete: [Policy operations](policy/POLICY_OPERATIONS.md) and `.ripr/goals/lane2-policy-operations.toml` define the closed focused tracker. RIPR-SPEC-0039 defines the policy operations report contract, `ripr policy operations` writes the first operator packet, RIPR-SPEC-0041 defines policy history trends, `ripr policy history` writes the advisory trend packet, RIPR-SPEC-0042 defines manual-review promotion packets, `ripr policy promote --to ...` writes those packets, RIPR-SPEC-0044 defines default-blocked preview evidence promotion packets, `ripr policy preview-promote` writes preview evidence promotion packets, [Policy operations workflow](POLICY_OPERATIONS_WORKFLOW.md) documents maintainer use, generated CI surfaces operations, history, promotion, and configured preview-promotion artifacts as advisory-only packets, and [closeout audit](handoffs/2026-05-13-policy-operations-closeout.md) records the final Lane 2 boundary. | | Generated Evidence Discipline (repo operations lane) | Make generated evidence, authored truth, deterministic repair, judgment-required decisions, and review receipts mechanically distinct for agentic development. | Complete: badge endpoint ownership, generated-clean checks, worktree doctor, PR triage, PR status, spec numbering, campaign checks, command mutability catalog, existing receipts/critic surfaces, suggested fixes, contributor docs, `pr-ready`, repo `cockpit`, repo-ops report indexing, merge-watch policy, queue disposition, and [closeout audits](handoffs/2026-05-14-generated-evidence-discipline-closeout.md) / [Repo-Ops UX cockpit closeout](handoffs/2026-05-16-repo-ops-ux-cockpit-closeout.md) are in place. | diff --git a/docs/lanes/TYPESCRIPT_ENABLEMENT.md b/docs/lanes/TYPESCRIPT_ENABLEMENT.md index 79d600b9052..9d3a496fbe8 100644 --- a/docs/lanes/TYPESCRIPT_ENABLEMENT.md +++ b/docs/lanes/TYPESCRIPT_ENABLEMENT.md @@ -138,7 +138,6 @@ cargo xtask check-capabilities cargo xtask check-pr git diff --check ``` - Docs-only changes should run: ```bash @@ -147,4 +146,3 @@ cargo xtask markdown-links cargo xtask check-static-language git diff --check ``` - diff --git a/fixtures/python-real-repo-evals/SPEC.md b/fixtures/python-real-repo-evals/SPEC.md new file mode 100644 index 00000000000..90d5b6e77e4 --- /dev/null +++ b/fixtures/python-real-repo-evals/SPEC.md @@ -0,0 +1,29 @@ +# Python Real-Repo Eval Corpus + +Spec: RIPR-SPEC-0028 + +Related: RIPR-SPEC-0057 + +## Given + +Python repair-routing dogfood runs can come from scratch repos or real repos +that are outside analyzer fixture goldens. + +## When + +An eval case records a Python check run, top repair card, focused verify +command, after check run, and before/after outcome receipt. + +## Then + +The corpus records the repo shape, source kind, commands, runtime, canonical +gap ID, missing discriminator, suggested test target, verify result, receipt +result, gap movement, usability notes, false-positive notes, limitation notes, +and claim boundaries. + +## Must Not + +- Do not treat these records as support-tier promotion. +- Do not claim correctness, mutation adequacy, generated tests, provider calls, + CI gate eligibility, or arbitrary runtime import execution. +- Do not hide missing normal pytest, API, CLI/tooling, or mixed-repo dogfood. diff --git a/fixtures/python-real-repo-evals/corpus.json b/fixtures/python-real-repo-evals/corpus.json new file mode 100644 index 00000000000..0111c67b0cc --- /dev/null +++ b/fixtures/python-real-repo-evals/corpus.json @@ -0,0 +1,52 @@ +{ + "schema_version": "0.1", + "kind": "python_real_repo_eval_corpus", + "spec": "RIPR-SPEC-0028", + "related_spec": "RIPR-SPEC-0057", + "description": "Checked dogfood records for Python repair-routing runs outside analyzer fixture goldens.", + "limits": [ + "static preview evidence only", + "advisory dogfood receipts only", + "no provider calls", + "no generated tests", + "no mutation execution", + "no CI gate or support-tier promotion" + ], + "cases": [ + { + "id": "tiny_controlled_pytest_boundary_receipt", + "repo_shape": "tiny_controlled_pytest", + "source_kind": "scratch_repo", + "source_ref": "target/ripr/python-real-repo-evals/tiny-controlled-pytest-receipt", + "command": "ripr check --root target/ripr/python-real-repo-evals/tiny-controlled-pytest-receipt --base HEAD~1 --format json", + "runtime_ms": 114, + "top_finding_summary": "Python predicate-boundary repair card for calculate_discount amount >= threshold", + "canonical_gap_id": "gap:python:app/pricing.py:calculate_discount:predicate_boundary:predicate:amount>=threshold", + "repair_card_present": true, + "repair_action": "strengthen_existing_test", + "changed_owner": "python:app/pricing.py::calculate_discount", + "missing_discriminator": "amount == threshold", + "suggested_test_file": "tests/test_pricing.py", + "suggested_test_name": "test_calculate_discount_smoke", + "verify_command": "pytest tests/test_pricing.py::test_calculate_discount_smoke", + "verify_result": "pass", + "verify_summary": "1 passed in 0.30s", + "after_command": "ripr check --root target/ripr/python-real-repo-evals/tiny-controlled-pytest-receipt --base HEAD~1 --format json", + "after_runtime_ms": 58, + "receipt_command": "ripr outcome --before before-check.json --after after-check.json --format json", + "receipt_result": "pass", + "gap_movement": "closed", + "closed_gaps": 1, + "usability": "usable", + "false_positive_notes": "none observed", + "limitation_notes": "tiny controlled scratch repo only; normal pytest app, API, CLI/tooling, and mixed repo dogfood remain outstanding", + "claim_boundary": [ + "Python remains preview/advisory", + "No arbitrary imports or tests were run by RIPR", + "The human-run pytest command verified only the suggested test", + "No support-tier promotion" + ], + "reason": "The run proves one non-fixture Python PR shape can produce a bounded repair card, pass the verify command, and close the canonical gap through an outcome receipt." + } + ] +} diff --git a/metrics/capabilities.toml b/metrics/capabilities.toml index 66126bbd4ef..106b72fd985 100644 --- a/metrics/capabilities.toml +++ b/metrics/capabilities.toml @@ -367,14 +367,15 @@ evidence = [ "fixtures/actionable-gap-outcomes-corpus pins not-attempted, receipt-present, improved, unchanged, regressed, resolved, attempted-without-receipt, and orphaned-receipt outcome joins", "fixtures/surface-projection-alignment/corpus.json pins a receipt-backed canonical gap whose packet_id, canonical_gap_id, repair_kind, verify command, receipt command/state, evidence_improved outcome, and readiness top_next_action stay aligned while badge/LSP/PR/CI remain advisory consumers", "fixtures/real-repair-attempts/corpus.json records repo-local repair-loop attempts across improved, resolved, unchanged, expected_unchanged_negative_capability, attempted_no_receipt, and static-limitation route-improvement outcomes with packet identity, canonical gap identity, verify command/result, receipt command/path/state, must-not-change boundaries, raw evidence refs, operator notes, and negative-capability limitation-route improvements; TypeScript preview receipt cases include typescript_preview_lsp_repair_context_improved, javascript_preview_generated_ci_grouping_improved, typescript_preview_mocked_module_limitation_improved, and typescript_preview_weak_oracle_downgrade_unchanged; the Python preview case python_preview_boundary_gap_test_only_closed records a test-only packet, focused pytest verify command, forbidden production file, and closed canonical gap receipt; language_repair_route_quality reports TypeScript, JavaScript, and Python preview outcomes by language and repair kind", + "fixtures/python-real-repo-evals/corpus.json records a tiny controlled pytest scratch-repo evaluation where RIPR emits a Python predicate-boundary repair card, a human-run focused pytest command passes, and the before/after outcome receipt closes the canonical gap while leaving broader normal-pytest/API/CLI/mixed dogfood outstanding", "fixtures/user-surface-projection-alignment/corpus.json pins full badge, LSP, PR comment, and CI examples to the same actionable packet identity by source_alignment_case while limited runtime-state examples use canonical_runtime_status with null packet identity and degraded route-quality rows preserve non-success next actions", "xtask::tests::dogfood_user_surface_projection_alignment_reports_contract_drift, dogfood_user_surface_projection_alignment_accepts_limited_runtime_status, dogfood_user_surface_projection_alignment_rejects_wrong_runtime_repair_route, dogfood_user_surface_projection_alignment_rejects_limited_static_limitation_backlog_projection, dogfood_surface_projection_alignment_covers_route_quality_non_success, dogfood_surface_projection_alignment_covers_missing_receipt_route_quality, dogfood_user_surface_projection_alignment_matches_route_quality_non_success_source, dogfood_user_surface_projection_alignment_matches_missing_receipt_source, dogfood_user_surface_projection_alignment_covers_route_quality_non_success_all_surfaces, dogfood_user_surface_projection_alignment_matches_surface_projection_source, ripr_swarm_repair_route_quality_samples_failed_attempts_only, ripr_swarm_readiness_audits_blocked_state_routes, ripr_swarm_readiness_routes_static_limitation_backlog_when_no_ready_packets, lane1_static_limitation_backlog_emits_analyzer_packets, and lane1_static_limitation_backlog_splits_same_category_by_repair_route pin user-surface fail-closed behavior, named runtime repair routes, limited-runtime rejection of stale static-limitation backlog projection, non-success route-quality preservation across public consumers, expected unchanged negative-capability receipts, missing-receipt routing, blocked-state route auditing, readiness top limitation routes with inspectable source samples including line, expression, limitation reason, and non-claims, route-grained limitation backlog packets, and full-row anchoring to the repair-loop source fixture", "docs/handoffs/2026-05-27-lane1-evidence-to-repair-closeout-audit.md records fresh local proof across lane1-evidence-audit, swarm plan, actionable-gap-outcomes, attempt-ledger, readiness, scorecard, trend, dogfood, and cache reports; the proof is limited_incomplete_input, not a full lane closeout", "the implemented plan, attempt-ledger, and readiness commands are report-only and do not edit files, run tests, call providers, generate tests, create receipts, run mutation testing, change PR/CI rendering, change LSP/editor behavior, change gates, or change public badges" ] -fixtures = ["fixtures/swarm-plan-packet-corpus", "fixtures/actionable-gap-outcomes-corpus", "fixtures/surface-projection-alignment", "fixtures/real-repair-attempts", "fixtures/user-surface-projection-alignment"] +fixtures = ["fixtures/swarm-plan-packet-corpus", "fixtures/actionable-gap-outcomes-corpus", "fixtures/surface-projection-alignment", "fixtures/real-repair-attempts", "fixtures/python-real-repo-evals", "fixtures/user-surface-projection-alignment"] next = "analysis/related-test-ranking-audit-fixes" -metric = "readiness_state, swarm_ready_packets, swarm_blocked_packets, swarm_blocked_by_missing_context_packets, swarm_blocked_by_static_limitation_packets, swarm_blocked_by_public_projection_exclusion_packets, swarm_public_projection_exclusion_reasons, swarm_blocked_by_operator_judgment_packets, swarm_missing_canonical_gap_id, swarm_not_actionable_gap_state, swarm_missing_verify_command, swarm_missing_verify_result, swarm_missing_receipt_command, swarm_missing_repair_route, swarm_missing_target_test_shape, swarm_missing_must_not_change, swarm_missing_allowed_edit_surface, swarm_missing_raw_evidence_refs, swarm_related_context_missing, swarm_static_limitation_packets, swarm_high_confidence_packets, swarm_attempt_ledger_attempts_total, swarm_attempt_ledger_expected_unchanged, swarm_attempt_history_attempts_total, swarm_attempt_history_durable_attempts_total, swarm_attempt_history_evidence_unchanged, swarm_attempt_history_attempted_no_receipt, swarm_attempt_history_expected_unchanged, swarm_attempted_packets, swarm_verified_improved, swarm_verified_unchanged, swarm_expected_unchanged_packets, swarm_verified_regressed, swarm_failed_to_apply, swarm_orphaned_receipts, blocked_state_routes, blocked_state_route_examples, limitation_backlog_packets, repair_kind_attempted, repair_kind_improved, repair_kind_unchanged, repair_kind_expected_unchanged, repair_kind_regressed, repair_kind_missing_verify_result, repair_kind_failure_count, repair_kind_dominant_failure_reason, repair_kind_success_rate, top_failing_repair_routes, top_limitation_routes, top_missing_evidence_fields, top_next_action, surface_projection_alignment_receipts, real_repair_attempt_receipts, user_surface_projection_alignment_receipts, lane1_closeout_evidence_audit" +metric = "readiness_state, swarm_ready_packets, swarm_blocked_packets, swarm_blocked_by_missing_context_packets, swarm_blocked_by_static_limitation_packets, swarm_blocked_by_public_projection_exclusion_packets, swarm_public_projection_exclusion_reasons, swarm_blocked_by_operator_judgment_packets, swarm_missing_canonical_gap_id, swarm_not_actionable_gap_state, swarm_missing_verify_command, swarm_missing_verify_result, swarm_missing_receipt_command, swarm_missing_repair_route, swarm_missing_target_test_shape, swarm_missing_must_not_change, swarm_missing_allowed_edit_surface, swarm_missing_raw_evidence_refs, swarm_related_context_missing, swarm_static_limitation_packets, swarm_high_confidence_packets, swarm_attempt_ledger_attempts_total, swarm_attempt_ledger_expected_unchanged, swarm_attempt_history_attempts_total, swarm_attempt_history_durable_attempts_total, swarm_attempt_history_evidence_unchanged, swarm_attempt_history_attempted_no_receipt, swarm_attempt_history_expected_unchanged, swarm_attempted_packets, swarm_verified_improved, swarm_verified_unchanged, swarm_expected_unchanged_packets, swarm_verified_regressed, swarm_failed_to_apply, swarm_orphaned_receipts, blocked_state_routes, blocked_state_route_examples, limitation_backlog_packets, repair_kind_attempted, repair_kind_improved, repair_kind_unchanged, repair_kind_expected_unchanged, repair_kind_regressed, repair_kind_missing_verify_result, repair_kind_failure_count, repair_kind_dominant_failure_reason, repair_kind_success_rate, top_failing_repair_routes, top_limitation_routes, top_missing_evidence_fields, top_next_action, surface_projection_alignment_receipts, real_repair_attempt_receipts, language_adapter_python_real_repo_eval_receipt, user_surface_projection_alignment_receipts, lane1_closeout_evidence_audit" [[capability]] id = "lane1_canonical_actionability_contract" @@ -1532,6 +1533,7 @@ evidence = [ "fixtures/first_successful_pr/python-output-gap/inputs/reports/before-check.json, inputs/reports/after-check.json, and expected/outcome/closed.{json,md} pin Python output/log gap closure from broad output smoke to exact output text evidence", "fixtures/first_successful_pr/python-preview-gap/inputs/agent-results/closed.json and expected/swarm-ingest/closed.json pin ripr swarm ingest classification for a Python preview test-only agent attempt with passing verify evidence and resolved receipt movement", "fixtures/real-repair-attempts/corpus.json:python_preview_boundary_gap_test_only_closed records a repo-local Python preview packet that edits only tests/test_pricing.py, forbids app/pricing.py, runs a focused pytest verify command, and closes the predicate-boundary canonical gap through a ripr outcome receipt", + "fixtures/python-real-repo-evals/corpus.json:tiny_controlled_pytest_boundary_receipt records a scratch pytest repo repair card, human-run focused pytest verify pass, and closed Python predicate-boundary outcome receipt while broader normal-pytest/API/CLI/mixed real-repo dogfood remains outstanding", "static-limit fixtures cover dynamic_dispatch, dynamic import through missing_import_graph, decorator_indirection, mocked_module with patch and monkeypatch syntax, opaque_custom_assertion_helper, property_based_test, unresolved_pytest_fixture, missing_import_graph, metaprogramming including metaclass declarations, and unsupported_syntax", "python_generated_file_excluded pins detectable generated Python diffs such as *_pb2.py as zero-finding, zero-repair-card inputs so generated-code edits stay out of preview repair routing", "cargo xtask dogfood checks Python preview receipts for missing_import_graph, disabled-language behavior, and no cross-language related-test routing", @@ -1583,10 +1585,11 @@ fixtures = [ "fixtures/first_successful_pr/python-exception-gap", "fixtures/first_successful_pr/python-field-gap", "fixtures/first_successful_pr/python-output-gap", - "fixtures/real-repair-attempts" + "fixtures/real-repair-attempts", + "fixtures/python-real-repo-evals" ] next = "cli/python-first-use-path" -metric = "language_adapter_python_findings_preview, language_adapter_python_canonical_gap_identity, language_adapter_python_ripr_evidence_model, language_adapter_python_repair_class_predicate_boundary, language_adapter_python_repair_class_return_value, language_adapter_python_repair_class_exception_path, language_adapter_python_repair_class_field_value, language_adapter_python_repair_class_output_or_call_effect, language_adapter_python_repair_guidance_suppressed_non_actionable, language_adapter_python_repair_ranking_noise_control, language_adapter_python_test_placement_verify, language_adapter_python_repair_card_v1, language_adapter_python_existing_test_strengthening, language_adapter_python_agent_packet_v1, language_adapter_python_swarm_queue_stale_packets, language_adapter_python_gap_receipt_from_check_output, language_adapter_python_real_repair_attempt_receipt, language_adapter_python_pilot_first_use_path, language_adapter_python_pr_summary_repair_card_projection, language_adapter_python_lsp_agent_packet_action, language_adapter_python_lsp_repair_card_action, language_adapter_python_lsp_pytest_skeleton_action, language_adapter_python_first_pr_start_here_path, language_adapter_python_first_pr_check_output_bridge, language_adapter_python_swarm_ingest, language_adapter_python_swarm_ingest_result_states, language_adapter_python_generated_file_exclusion, language_adapter_python_static_limit_stop_reasons, language_adapter_python_static_limit_mocked_module, language_adapter_python_static_limit_opaque_custom_assertion_helper, language_adapter_python_static_limit_property_based_test, language_adapter_python_static_limit_unresolved_pytest_fixture, language_adapter_python_static_limit_*" +metric = "language_adapter_python_findings_preview, language_adapter_python_canonical_gap_identity, language_adapter_python_ripr_evidence_model, language_adapter_python_repair_class_predicate_boundary, language_adapter_python_repair_class_return_value, language_adapter_python_repair_class_exception_path, language_adapter_python_repair_class_field_value, language_adapter_python_repair_class_output_or_call_effect, language_adapter_python_repair_guidance_suppressed_non_actionable, language_adapter_python_repair_ranking_noise_control, language_adapter_python_test_placement_verify, language_adapter_python_repair_card_v1, language_adapter_python_existing_test_strengthening, language_adapter_python_agent_packet_v1, language_adapter_python_swarm_queue_stale_packets, language_adapter_python_gap_receipt_from_check_output, language_adapter_python_real_repair_attempt_receipt, language_adapter_python_real_repo_eval_receipt, language_adapter_python_pilot_first_use_path, language_adapter_python_pr_summary_repair_card_projection, language_adapter_python_lsp_agent_packet_action, language_adapter_python_lsp_repair_card_action, language_adapter_python_lsp_pytest_skeleton_action, language_adapter_python_first_pr_start_here_path, language_adapter_python_first_pr_check_output_bridge, language_adapter_python_swarm_ingest, language_adapter_python_swarm_ingest_result_states, language_adapter_python_generated_file_exclusion, language_adapter_python_static_limit_stop_reasons, language_adapter_python_static_limit_mocked_module, language_adapter_python_static_limit_opaque_custom_assertion_helper, language_adapter_python_static_limit_property_based_test, language_adapter_python_static_limit_unresolved_pytest_fixture, language_adapter_python_static_limit_*" [[capability]] id = "typescript_preview_static_facts" diff --git a/plans/python-repair-routing/implementation-plan.md b/plans/python-repair-routing/implementation-plan.md index ba15558d74f..d70d612f891 100644 --- a/plans/python-repair-routing/implementation-plan.md +++ b/plans/python-repair-routing/implementation-plan.md @@ -1167,7 +1167,7 @@ Prevent Python support from becoming noisy. ### Work item: dogfood/python-real-repo-evals -Status: planned +Status: in progress Blocked by: @@ -1196,6 +1196,13 @@ Prove usefulness outside fixtures. durable repair-attempt corpus, so the first closed Python packet/receipt loop is visible in the same advisory dogfood report as other swarm repair attempts. +- `fixtures/python-real-repo-evals/corpus.json` now records a tiny controlled + pytest scratch-repo eval where RIPR emits a predicate-boundary repair card, + a human-run focused pytest command passes, and `ripr outcome` closes the + canonical Python gap while preserving the preview/advisory claim boundary. +- `cargo xtask dogfood` projects the Python real-repo eval corpus into the + dogfood report as receipt-backed eval evidence separate from analyzer + fixture goldens. - Broader outside-fixture evaluations across normal pytest, API, CLI/tooling, and mixed Python repos remain the next dogfood slice before metrics or support-tier promotion. diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 04cece633ca..c70d9c01908 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -942,6 +942,71 @@ struct DogfoodRealRepairAttemptRun { errors: Vec, } +#[derive(Debug)] +struct DogfoodPythonRealRepoEvalScenario { + name: String, + repo_shape: String, + source_kind: String, + source_ref: String, + command: String, + runtime_ms: usize, + top_finding_summary: String, + canonical_gap_id: String, + repair_card_present: bool, + repair_action: String, + changed_owner: String, + missing_discriminator: String, + suggested_test_file: String, + suggested_test_name: String, + verify_command: String, + verify_result: String, + verify_summary: String, + after_command: String, + after_runtime_ms: usize, + receipt_command: String, + receipt_result: String, + gap_movement: String, + closed_gaps: usize, + usability: String, + false_positive_notes: String, + limitation_notes: String, + claim_boundary: Vec, + reason: String, +} + +#[derive(Debug)] +struct DogfoodPythonRealRepoEvalRun { + name: String, + repo_shape: String, + source_kind: String, + source_ref: String, + command: String, + runtime_ms: usize, + top_finding_summary: String, + canonical_gap_id: String, + repair_card_present: bool, + repair_action: String, + changed_owner: String, + missing_discriminator: String, + suggested_test_file: String, + suggested_test_name: String, + verify_command: String, + verify_result: String, + verify_summary: String, + after_command: String, + after_runtime_ms: usize, + receipt_command: String, + receipt_result: String, + gap_movement: String, + closed_gaps: usize, + usability: String, + false_positive_notes: String, + limitation_notes: String, + claim_boundary: Vec, + reason: String, + errors: Vec, +} + #[derive(Debug)] struct DogfoodTypescriptPreviewRepairLoopScenario { name: String, @@ -1082,6 +1147,7 @@ struct DogfoodReportInputs<'a> { finding_alignment_runs: &'a [DogfoodFindingAlignmentRun], surface_projection_alignment_runs: &'a [DogfoodSurfaceProjectionAlignmentRun], real_repair_attempt_runs: &'a [DogfoodRealRepairAttemptRun], + python_real_repo_eval_runs: &'a [DogfoodPythonRealRepoEvalRun], typescript_preview_repair_loop_runs: &'a [DogfoodTypescriptPreviewRepairLoopRun], user_surface_projection_runs: &'a [DogfoodUserSurfaceProjectionRun], pr_inline_comment_runs: &'a [DogfoodPrInlineCommentRun], @@ -5445,6 +5511,7 @@ fn is_manifest_only_fixture_dir(path: &Path) -> bool { | "finding-alignment-dogfood" | "gap-decision-ledger" | "python" + | "python-real-repo-evals" | "real-repair-attempts" | "surface-projection-alignment" | "swarm-plan-packet-corpus" @@ -7762,6 +7829,7 @@ fn check_fixture_contracts() -> Result<(), String> { validate_finding_alignment_dogfood_fixture_corpus(&mut violations)?; validate_gap_decision_ledger_fixture_corpus(&mut violations)?; validate_real_repair_attempt_fixture_corpus(&mut violations)?; + validate_python_real_repo_eval_fixture_corpus(&mut violations)?; validate_surface_projection_alignment_fixture_corpus(&mut violations)?; validate_typescript_preview_repair_loop_fixture_corpus(&mut violations)?; validate_user_surface_projection_alignment_fixture_corpus(&mut violations)?; @@ -7945,6 +8013,7 @@ const EVIDENCE_QUALITY_BENCHMARK_REQUIRED_CONFIG_POLICY_CASES: &[&str] = &[ const FINDING_ALIGNMENT_DOGFOOD_CORPUS: &str = "fixtures/finding-alignment-dogfood/corpus.json"; const REAL_REPAIR_ATTEMPTS_CORPUS: &str = "fixtures/real-repair-attempts/corpus.json"; +const PYTHON_REAL_REPO_EVAL_CORPUS: &str = "fixtures/python-real-repo-evals/corpus.json"; const SURFACE_PROJECTION_ALIGNMENT_CORPUS: &str = "fixtures/surface-projection-alignment/corpus.json"; const TYPESCRIPT_PREVIEW_REPAIR_LOOP_CORPUS: &str = @@ -8021,6 +8090,9 @@ const REAL_REPAIR_ATTEMPTS_REQUIRED_CASES: &[(&str, &str)] = &[ ("python_preview_boundary_gap_test_only_closed", "resolved"), ]; +const PYTHON_REAL_REPO_EVAL_REQUIRED_CASES: &[(&str, &str)] = + &[("tiny_controlled_pytest_boundary_receipt", "closed")]; + const TYPESCRIPT_PREVIEW_REPAIR_LOOP_REQUIRED_CASES: &[(&str, &str)] = &[ ("typescript_boundary_predicate_proof", "proof_improved"), ( @@ -9071,6 +9143,85 @@ fn validate_real_repair_attempt_fixture_corpus_at( Ok(()) } +fn validate_python_real_repo_eval_fixture_corpus( + violations: &mut Vec, +) -> Result<(), String> { + let root = Path::new("fixtures/python-real-repo-evals"); + for required in ["SPEC.md", "corpus.json"] { + let path = root.join(required); + if !path.exists() { + violations.push(format!( + "Python real-repo eval fixture corpus is missing {}", + normalize_path(&path) + )); + } + } + validate_python_real_repo_eval_fixture_corpus_at( + Path::new(PYTHON_REAL_REPO_EVAL_CORPUS), + violations, + ) +} + +fn validate_python_real_repo_eval_fixture_corpus_at( + path: &Path, + violations: &mut Vec, +) -> Result<(), String> { + if !path.exists() { + violations.push(format!( + "Python real-repo eval corpus is missing {}", + normalize_path(path) + )); + return Ok(()); + } + + let scenarios = dogfood_python_real_repo_eval_scenarios_at(path); + let mut seen = BTreeMap::new(); + let mut closed_cases = 0usize; + for scenario in &scenarios { + if seen + .insert(scenario.name.clone(), scenario.gap_movement.clone()) + .is_some() + { + violations.push(format!( + "Python real-repo eval case {} is duplicated", + scenario.name + )); + } + if scenario.gap_movement == "closed" { + closed_cases += 1; + } + let run = dogfood_python_real_repo_eval_run(scenario); + for error in run.errors { + violations.push(format!( + "Python real-repo eval case {}: {error}", + scenario.name + )); + } + } + + for (case_id, gap_movement) in PYTHON_REAL_REPO_EVAL_REQUIRED_CASES { + match seen.get(*case_id) { + Some(actual) if actual == gap_movement => {} + Some(actual) => violations.push(format!( + "Python real-repo eval case {case_id} must have gap_movement {gap_movement}, got {actual}" + )), + None => violations.push(format!( + "Python real-repo eval corpus is missing case {case_id}" + )), + } + } + if scenarios.is_empty() { + violations.push("Python real-repo eval corpus must record at least one case".to_string()); + } + if closed_cases == 0 { + violations.push( + "Python real-repo eval corpus must include at least one closed gap receipt".to_string(), + ); + } + + Ok(()) +} + fn validate_typescript_preview_repair_loop_fixture_corpus( violations: &mut Vec, ) -> Result<(), String> { @@ -40248,6 +40399,10 @@ pub(crate) fn dogfood_impl() -> Result<(), String> { .into_iter() .map(|scenario| dogfood_real_repair_attempt_run(&scenario)) .collect::>(); + let python_real_repo_eval_runs = dogfood_python_real_repo_eval_scenarios() + .into_iter() + .map(|scenario| dogfood_python_real_repo_eval_run(&scenario)) + .collect::>(); let typescript_preview_repair_loop_runs = dogfood_typescript_preview_repair_loop_scenarios() .into_iter() .map(|scenario| dogfood_typescript_preview_repair_loop_run(&scenario)) @@ -40277,6 +40432,7 @@ pub(crate) fn dogfood_impl() -> Result<(), String> { finding_alignment_runs: &finding_alignment_runs, surface_projection_alignment_runs: &surface_projection_alignment_runs, real_repair_attempt_runs: &real_repair_attempt_runs, + python_real_repo_eval_runs: &python_real_repo_eval_runs, typescript_preview_repair_loop_runs: &typescript_preview_repair_loop_runs, user_surface_projection_runs: &user_surface_projection_runs, pr_inline_comment_runs: &pr_inline_comment_runs, @@ -43271,6 +43427,289 @@ fn dogfood_real_repair_attempt_conflicting_evidence_movement_tokens( .collect() } +fn dogfood_python_real_repo_eval_scenarios() -> Vec { + dogfood_python_real_repo_eval_scenarios_at(Path::new(PYTHON_REAL_REPO_EVAL_CORPUS)) +} + +fn dogfood_python_real_repo_eval_scenarios_at( + corpus_path: &Path, +) -> Vec { + let fallback = |reason: String| { + vec![DogfoodPythonRealRepoEvalScenario { + name: "corpus".to_string(), + repo_shape: "unknown".to_string(), + source_kind: "unknown".to_string(), + source_ref: "unknown".to_string(), + command: "unknown".to_string(), + runtime_ms: 0, + top_finding_summary: "unknown".to_string(), + canonical_gap_id: "unknown".to_string(), + repair_card_present: false, + repair_action: "unknown".to_string(), + changed_owner: "unknown".to_string(), + missing_discriminator: "unknown".to_string(), + suggested_test_file: "unknown".to_string(), + suggested_test_name: "unknown".to_string(), + verify_command: "unknown".to_string(), + verify_result: "unknown".to_string(), + verify_summary: "unknown".to_string(), + after_command: "unknown".to_string(), + after_runtime_ms: 0, + receipt_command: "unknown".to_string(), + receipt_result: "unknown".to_string(), + gap_movement: "unknown".to_string(), + closed_gaps: 0, + usability: "unknown".to_string(), + false_positive_notes: "unknown".to_string(), + limitation_notes: "unknown".to_string(), + claim_boundary: Vec::new(), + reason, + }] + }; + + let corpus = match read_json_value(corpus_path) { + Ok(value) => value, + Err(err) => return fallback(err), + }; + if json_string_field(&corpus, "schema_version").as_deref() != Some("0.1") { + return fallback("Python real-repo eval corpus schema_version must be 0.1".to_string()); + } + if json_string_field(&corpus, "kind").as_deref() != Some("python_real_repo_eval_corpus") { + return fallback( + "Python real-repo eval corpus kind must be python_real_repo_eval_corpus".to_string(), + ); + } + if json_string_field(&corpus, "spec").as_deref() != Some("RIPR-SPEC-0028") { + return fallback("Python real-repo eval corpus spec must be RIPR-SPEC-0028".to_string()); + } + if json_string_field(&corpus, "related_spec").as_deref() != Some("RIPR-SPEC-0057") { + return fallback( + "Python real-repo eval corpus related_spec must be RIPR-SPEC-0057".to_string(), + ); + } + let Some(cases) = corpus.get("cases").and_then(Value::as_array) else { + return fallback("Python real-repo eval corpus is missing cases array".to_string()); + }; + + cases + .iter() + .map(|case| DogfoodPythonRealRepoEvalScenario { + name: json_string_field(case, "id").unwrap_or_else(|| "unknown".to_string()), + repo_shape: json_string_field(case, "repo_shape") + .unwrap_or_else(|| "unknown".to_string()), + source_kind: json_string_field(case, "source_kind") + .unwrap_or_else(|| "unknown".to_string()), + source_ref: json_string_field(case, "source_ref") + .unwrap_or_else(|| "unknown".to_string()), + command: json_string_field(case, "command").unwrap_or_else(|| "unknown".to_string()), + runtime_ms: json_usize_field(case, "runtime_ms").unwrap_or_default(), + top_finding_summary: json_string_field(case, "top_finding_summary") + .unwrap_or_else(|| "unknown".to_string()), + canonical_gap_id: json_string_field(case, "canonical_gap_id") + .unwrap_or_else(|| "unknown".to_string()), + repair_card_present: json_bool_field(case, "repair_card_present").unwrap_or(false), + repair_action: json_string_field(case, "repair_action") + .unwrap_or_else(|| "unknown".to_string()), + changed_owner: json_string_field(case, "changed_owner") + .unwrap_or_else(|| "unknown".to_string()), + missing_discriminator: json_string_field(case, "missing_discriminator") + .unwrap_or_else(|| "unknown".to_string()), + suggested_test_file: json_string_field(case, "suggested_test_file") + .unwrap_or_else(|| "unknown".to_string()), + suggested_test_name: json_string_field(case, "suggested_test_name") + .unwrap_or_else(|| "unknown".to_string()), + verify_command: json_string_field(case, "verify_command") + .unwrap_or_else(|| "unknown".to_string()), + verify_result: json_string_field(case, "verify_result") + .unwrap_or_else(|| "unknown".to_string()), + verify_summary: json_string_field(case, "verify_summary") + .unwrap_or_else(|| "unknown".to_string()), + after_command: json_string_field(case, "after_command") + .unwrap_or_else(|| "unknown".to_string()), + after_runtime_ms: json_usize_field(case, "after_runtime_ms").unwrap_or_default(), + receipt_command: json_string_field(case, "receipt_command") + .unwrap_or_else(|| "unknown".to_string()), + receipt_result: json_string_field(case, "receipt_result") + .unwrap_or_else(|| "unknown".to_string()), + gap_movement: json_string_field(case, "gap_movement") + .unwrap_or_else(|| "unknown".to_string()), + closed_gaps: json_usize_field(case, "closed_gaps").unwrap_or_default(), + usability: json_string_field(case, "usability") + .unwrap_or_else(|| "unknown".to_string()), + false_positive_notes: json_string_field(case, "false_positive_notes") + .unwrap_or_else(|| "unknown".to_string()), + limitation_notes: json_string_field(case, "limitation_notes") + .unwrap_or_else(|| "unknown".to_string()), + claim_boundary: json_string_array_field(case, "claim_boundary"), + reason: json_string_field(case, "reason").unwrap_or_else(|| { + "Python real-repo eval case did not document a reason".to_string() + }), + }) + .collect() +} + +fn dogfood_python_real_repo_eval_run( + scenario: &DogfoodPythonRealRepoEvalScenario, +) -> DogfoodPythonRealRepoEvalRun { + let mut errors = Vec::new(); + for (label, value) in [ + ("case id", &scenario.name), + ("repo_shape", &scenario.repo_shape), + ("source_kind", &scenario.source_kind), + ("source_ref", &scenario.source_ref), + ("command", &scenario.command), + ("top_finding_summary", &scenario.top_finding_summary), + ("canonical_gap_id", &scenario.canonical_gap_id), + ("repair_action", &scenario.repair_action), + ("changed_owner", &scenario.changed_owner), + ("missing_discriminator", &scenario.missing_discriminator), + ("suggested_test_file", &scenario.suggested_test_file), + ("suggested_test_name", &scenario.suggested_test_name), + ("verify_command", &scenario.verify_command), + ("verify_result", &scenario.verify_result), + ("verify_summary", &scenario.verify_summary), + ("after_command", &scenario.after_command), + ("receipt_command", &scenario.receipt_command), + ("receipt_result", &scenario.receipt_result), + ("gap_movement", &scenario.gap_movement), + ("usability", &scenario.usability), + ("false_positive_notes", &scenario.false_positive_notes), + ("limitation_notes", &scenario.limitation_notes), + ("reason", &scenario.reason), + ] { + if value.trim().is_empty() || value == "unknown" { + errors.push(format!("{label} must be present")); + } + } + if !matches!( + scenario.source_kind.as_str(), + "scratch_repo" | "external_repo" | "local_repo" + ) { + errors.push(format!( + "source_kind must be scratch_repo, external_repo, or local_repo, got {}", + scenario.source_kind + )); + } + if scenario.runtime_ms == 0 { + errors.push("runtime_ms must be greater than zero".to_string()); + } + if scenario.after_runtime_ms == 0 { + errors.push("after_runtime_ms must be greater than zero".to_string()); + } + if !scenario.canonical_gap_id.starts_with("gap:python:") { + errors.push(format!( + "canonical_gap_id must use gap:python: identity, got {}", + scenario.canonical_gap_id + )); + } + if !scenario.changed_owner.starts_with("python:") { + errors.push(format!( + "changed_owner must use python: identity, got {}", + scenario.changed_owner + )); + } + if !scenario.repair_card_present { + errors.push("repair_card_present must be true for recorded eval cases".to_string()); + } + if !scenario.verify_command.starts_with("pytest ") + && !scenario.verify_command.starts_with("python -m unittest ") + { + errors.push(format!( + "verify_command must be a pytest or unittest command, got {}", + scenario.verify_command + )); + } + if !matches!( + scenario.verify_result.as_str(), + "pass" | "fail" | "not_run" | "not_applicable" + ) { + errors.push(format!( + "verify_result must be pass, fail, not_run, or not_applicable, got {}", + scenario.verify_result + )); + } + if !matches!( + scenario.receipt_result.as_str(), + "pass" | "fail" | "not_run" | "not_applicable" + ) { + errors.push(format!( + "receipt_result must be pass, fail, not_run, or not_applicable, got {}", + scenario.receipt_result + )); + } + if !matches!( + scenario.gap_movement.as_str(), + "opened" | "closed" | "improved" | "unchanged" | "regressed" | "no_receipt" + ) { + errors.push(format!( + "gap_movement must be opened, closed, improved, unchanged, regressed, or no_receipt, got {}", + scenario.gap_movement + )); + } + if scenario.gap_movement == "closed" { + if scenario.closed_gaps == 0 { + errors.push("closed gap movement must record closed_gaps > 0".to_string()); + } + if scenario.verify_result != "pass" { + errors.push("closed gap movement requires verify_result=pass".to_string()); + } + if scenario.receipt_result != "pass" { + errors.push("closed gap movement requires receipt_result=pass".to_string()); + } + } + if scenario.receipt_command == scenario.verify_command { + errors.push("receipt_command must stay distinct from verify_command".to_string()); + } + if scenario.claim_boundary.is_empty() { + errors.push("claim_boundary must keep preview boundary denials visible".to_string()); + } + for required in [ + "preview", + "No arbitrary imports or tests were run by RIPR", + "No support-tier promotion", + ] { + if !scenario.claim_boundary.iter().any(|claim| { + claim + .to_ascii_lowercase() + .contains(&required.to_ascii_lowercase()) + }) { + errors.push(format!("claim_boundary must include {required}")); + } + } + + DogfoodPythonRealRepoEvalRun { + name: scenario.name.clone(), + repo_shape: scenario.repo_shape.clone(), + source_kind: scenario.source_kind.clone(), + source_ref: scenario.source_ref.clone(), + command: scenario.command.clone(), + runtime_ms: scenario.runtime_ms, + top_finding_summary: scenario.top_finding_summary.clone(), + canonical_gap_id: scenario.canonical_gap_id.clone(), + repair_card_present: scenario.repair_card_present, + repair_action: scenario.repair_action.clone(), + changed_owner: scenario.changed_owner.clone(), + missing_discriminator: scenario.missing_discriminator.clone(), + suggested_test_file: scenario.suggested_test_file.clone(), + suggested_test_name: scenario.suggested_test_name.clone(), + verify_command: scenario.verify_command.clone(), + verify_result: scenario.verify_result.clone(), + verify_summary: scenario.verify_summary.clone(), + after_command: scenario.after_command.clone(), + after_runtime_ms: scenario.after_runtime_ms, + receipt_command: scenario.receipt_command.clone(), + receipt_result: scenario.receipt_result.clone(), + gap_movement: scenario.gap_movement.clone(), + closed_gaps: scenario.closed_gaps, + usability: scenario.usability.clone(), + false_positive_notes: scenario.false_positive_notes.clone(), + limitation_notes: scenario.limitation_notes.clone(), + claim_boundary: scenario.claim_boundary.clone(), + reason: scenario.reason.clone(), + errors, + } +} + fn dogfood_typescript_preview_repair_loop_scenarios() -> Vec { dogfood_typescript_preview_repair_loop_scenarios_at(Path::new( @@ -45065,6 +45504,7 @@ fn dogfood_report_status(inputs: &DogfoodReportInputs<'_>) -> &'static str { let finding_alignment_runs = inputs.finding_alignment_runs; let surface_projection_alignment_runs = inputs.surface_projection_alignment_runs; let real_repair_attempt_runs = inputs.real_repair_attempt_runs; + let python_real_repo_eval_runs = inputs.python_real_repo_eval_runs; let typescript_preview_repair_loop_runs = inputs.typescript_preview_repair_loop_runs; let user_surface_projection_runs = inputs.user_surface_projection_runs; let pr_inline_comment_runs = inputs.pr_inline_comment_runs; @@ -45102,6 +45542,9 @@ fn dogfood_report_status(inputs: &DogfoodReportInputs<'_>) -> &'static str { || real_repair_attempt_runs .iter() .any(|run| !run.errors.is_empty()) + || python_real_repo_eval_runs + .iter() + .any(|run| !run.errors.is_empty()) || typescript_preview_repair_loop_runs .iter() .any(|run| !run.errors.is_empty()) @@ -45154,6 +45597,7 @@ fn dogfood_report_markdown(inputs: &DogfoodReportInputs<'_>) -> String { let finding_alignment_runs = inputs.finding_alignment_runs; let surface_projection_alignment_runs = inputs.surface_projection_alignment_runs; let real_repair_attempt_runs = inputs.real_repair_attempt_runs; + let python_real_repo_eval_runs = inputs.python_real_repo_eval_runs; let typescript_preview_repair_loop_runs = inputs.typescript_preview_repair_loop_runs; let user_surface_projection_runs = inputs.user_surface_projection_runs; let pr_inline_comment_runs = inputs.pr_inline_comment_runs; @@ -46359,6 +46803,119 @@ fn dogfood_report_markdown(inputs: &DogfoodReportInputs<'_>) -> String { } } + let python_real_repo_eval_total = python_real_repo_eval_runs.len(); + let python_real_repo_eval_closed = python_real_repo_eval_runs + .iter() + .filter(|run| run.gap_movement == "closed") + .count(); + let python_real_repo_eval_usable = python_real_repo_eval_runs + .iter() + .filter(|run| run.usability == "usable") + .count(); + body.push_str("## Python Real-Repo Eval Receipts\n\n"); + body.push_str("These receipts record Python repair-routing runs outside analyzer fixture goldens. They are advisory dogfood evidence for the repair card -> verify -> receipt loop, not support-tier promotion or runtime adequacy proof.\n\n"); + body.push_str("- Default CI blocking: no\n"); + body.push_str("- Receipt input: `fixtures/python-real-repo-evals/corpus.json`\n"); + body.push_str(&format!( + "- Cases: {}; closed gaps: {}; usable recommendations: {}\n\n", + python_real_repo_eval_total, python_real_repo_eval_closed, python_real_repo_eval_usable + )); + body.push_str( + "| Case | Repo shape | Source | Gap ID | Verify | Receipt | Movement | Usability |\n", + ); + body.push_str("| --- | --- | --- | --- | --- | --- | --- | --- |\n"); + for run in python_real_repo_eval_runs { + body.push_str(&format!( + "| `{}` | `{}` | `{}` | `{}` | `{}` | `{}` | `{}` | `{}` |\n", + markdown_cell(&run.name), + markdown_cell(&run.repo_shape), + markdown_cell(&run.source_kind), + markdown_cell(&run.canonical_gap_id), + markdown_cell(&run.verify_result), + markdown_cell(&run.receipt_result), + markdown_cell(&run.gap_movement), + markdown_cell(&run.usability) + )); + } + body.push('\n'); + for run in python_real_repo_eval_runs { + body.push_str(&format!("### Python Real-Repo Eval `{}`\n\n", run.name)); + body.push_str(&format!( + "- Source: `{}` / `{}`\n", + markdown_cell(&run.source_kind), + markdown_cell(&run.source_ref) + )); + body.push_str(&format!( + "- Command: `{}` ({} ms)\n", + markdown_cell(&run.command), + run.runtime_ms + )); + body.push_str(&format!( + "- Top finding: {}\n", + markdown_cell(&run.top_finding_summary) + )); + body.push_str(&format!( + "- Changed owner: `{}`\n", + markdown_cell(&run.changed_owner) + )); + body.push_str(&format!( + "- Missing discriminator: `{}`\n", + markdown_cell(&run.missing_discriminator) + )); + body.push_str(&format!( + "- Suggested test: `{}` / `{}`\n", + markdown_cell(&run.suggested_test_file), + markdown_cell(&run.suggested_test_name) + )); + body.push_str(&format!( + "- Repair card present: {}; action: `{}`\n", + run.repair_card_present, + markdown_cell(&run.repair_action) + )); + body.push_str(&format!( + "- Verify command: `{}` ({}) - {}\n", + markdown_cell(&run.verify_command), + markdown_cell(&run.verify_result), + markdown_cell(&run.verify_summary) + )); + body.push_str(&format!( + "- After command: `{}` ({} ms)\n", + markdown_cell(&run.after_command), + run.after_runtime_ms + )); + body.push_str(&format!( + "- Receipt command: `{}` ({})\n", + markdown_cell(&run.receipt_command), + markdown_cell(&run.receipt_result) + )); + body.push_str(&format!( + "- Gap movement: `{}`; closed gaps: {}\n", + markdown_cell(&run.gap_movement), + run.closed_gaps + )); + body.push_str(&format!( + "- False-positive notes: {}\n", + markdown_cell(&run.false_positive_notes) + )); + body.push_str(&format!( + "- Limitation notes: {}\n", + markdown_cell(&run.limitation_notes) + )); + body.push_str(&format!( + "- Claim boundary: `{}`\n", + markdown_cell(&run.claim_boundary.join("; ")) + )); + body.push_str(&format!("- Reason: {}\n", markdown_cell(&run.reason))); + if run.errors.is_empty() { + body.push_str("- Receipt validation: pass\n\n"); + } else { + body.push_str(&format!( + "- Receipt validation: fail - `{}`\n\n", + markdown_cell(&run.errors.join("; ")) + )); + } + } + body.push_str("## User Surface Projection Alignment Receipts\n\n"); body.push_str("These receipts validate that badge, LSP, PR comment, and CI projection examples consume canonical repair state for full runs and canonical runtime state for limited runs instead of independently interpreting raw findings. They keep all four surfaces advisory by default and require limited/stale state visibility.\n\n"); body.push_str("- Default CI blocking: no\n"); @@ -46644,6 +47201,7 @@ fn dogfood_report_json(inputs: &DogfoodReportInputs<'_>) -> String { let finding_alignment_runs = inputs.finding_alignment_runs; let surface_projection_alignment_runs = inputs.surface_projection_alignment_runs; let real_repair_attempt_runs = inputs.real_repair_attempt_runs; + let python_real_repo_eval_runs = inputs.python_real_repo_eval_runs; let typescript_preview_repair_loop_runs = inputs.typescript_preview_repair_loop_runs; let user_surface_projection_runs = inputs.user_surface_projection_runs; let pr_inline_comment_runs = inputs.pr_inline_comment_runs; @@ -47901,6 +48459,143 @@ fn dogfood_report_json(inputs: &DogfoodReportInputs<'_>) -> String { write_json_string_array(&mut body, &run.errors); body.push_str("]\n }"); } + body.push_str("\n ]\n },\n \"python_real_repo_evals\": {\n"); + body.push_str(" \"default_ci_blocking\": false,\n"); + body.push_str(" \"receipt_dir\": \"fixtures/python-real-repo-evals\",\n"); + body.push_str(" \"summary\": {\n"); + body.push_str(&format!( + " \"cases\": {},\n", + python_real_repo_eval_runs.len() + )); + body.push_str(&format!( + " \"closed\": {},\n", + python_real_repo_eval_runs + .iter() + .filter(|run| run.gap_movement == "closed") + .count() + )); + body.push_str(&format!( + " \"usable\": {}\n", + python_real_repo_eval_runs + .iter() + .filter(|run| run.usability == "usable") + .count() + )); + body.push_str(" },\n \"cases\": [\n"); + for (index, run) in python_real_repo_eval_runs.iter().enumerate() { + if index > 0 { + body.push_str(",\n"); + } + body.push_str(" {\n"); + body.push_str(&format!( + " \"name\": \"{}\",\n", + json_escape(&run.name) + )); + body.push_str(&format!( + " \"repo_shape\": \"{}\",\n", + json_escape(&run.repo_shape) + )); + body.push_str(&format!( + " \"source_kind\": \"{}\",\n", + json_escape(&run.source_kind) + )); + body.push_str(&format!( + " \"source_ref\": \"{}\",\n", + json_escape(&run.source_ref) + )); + body.push_str(&format!( + " \"command\": \"{}\",\n", + json_escape(&run.command) + )); + body.push_str(&format!(" \"runtime_ms\": {},\n", run.runtime_ms)); + body.push_str(&format!( + " \"top_finding_summary\": \"{}\",\n", + json_escape(&run.top_finding_summary) + )); + body.push_str(&format!( + " \"canonical_gap_id\": \"{}\",\n", + json_escape(&run.canonical_gap_id) + )); + body.push_str(&format!( + " \"repair_card_present\": {},\n", + run.repair_card_present + )); + body.push_str(&format!( + " \"repair_action\": \"{}\",\n", + json_escape(&run.repair_action) + )); + body.push_str(&format!( + " \"changed_owner\": \"{}\",\n", + json_escape(&run.changed_owner) + )); + body.push_str(&format!( + " \"missing_discriminator\": \"{}\",\n", + json_escape(&run.missing_discriminator) + )); + body.push_str(&format!( + " \"suggested_test_file\": \"{}\",\n", + json_escape(&run.suggested_test_file) + )); + body.push_str(&format!( + " \"suggested_test_name\": \"{}\",\n", + json_escape(&run.suggested_test_name) + )); + body.push_str(&format!( + " \"verify_command\": \"{}\",\n", + json_escape(&run.verify_command) + )); + body.push_str(&format!( + " \"verify_result\": \"{}\",\n", + json_escape(&run.verify_result) + )); + body.push_str(&format!( + " \"verify_summary\": \"{}\",\n", + json_escape(&run.verify_summary) + )); + body.push_str(&format!( + " \"after_command\": \"{}\",\n", + json_escape(&run.after_command) + )); + body.push_str(&format!( + " \"after_runtime_ms\": {},\n", + run.after_runtime_ms + )); + body.push_str(&format!( + " \"receipt_command\": \"{}\",\n", + json_escape(&run.receipt_command) + )); + body.push_str(&format!( + " \"receipt_result\": \"{}\",\n", + json_escape(&run.receipt_result) + )); + body.push_str(&format!( + " \"gap_movement\": \"{}\",\n", + json_escape(&run.gap_movement) + )); + body.push_str(&format!(" \"closed_gaps\": {},\n", run.closed_gaps)); + body.push_str(&format!( + " \"usability\": \"{}\",\n", + json_escape(&run.usability) + )); + body.push_str(&format!( + " \"false_positive_notes\": \"{}\",\n", + json_escape(&run.false_positive_notes) + )); + body.push_str(&format!( + " \"limitation_notes\": \"{}\",\n", + json_escape(&run.limitation_notes) + )); + body.push_str(" \"claim_boundary\": ["); + write_json_string_array(&mut body, &run.claim_boundary); + body.push_str("],\n"); + body.push_str(&format!( + " \"reason\": \"{}\",\n", + json_escape(&run.reason) + )); + body.push_str(" \"errors\": ["); + write_json_string_array(&mut body, &run.errors); + body.push_str("]\n }"); + } body.push_str("\n ]\n },\n \"user_surface_projection_alignment\": {\n"); body.push_str(" \"default_ci_blocking\": false,\n"); body.push_str( @@ -60732,8 +61427,8 @@ mod tests { DogfoodFindingAlignmentScenario, DogfoodFirstActionRun, DogfoodFirstPrRun, DogfoodFrontPanelRun, DogfoodGateRun, DogfoodGeneratedCiCockpitRun, DogfoodLanguagePreviewRun, DogfoodPrInlineCommentRun, DogfoodPreviewProjectionRuns, - DogfoodRealRepairAttemptScenario, DogfoodReportInputs, DogfoodReportPacketIndexRun, - DogfoodRun, DogfoodSurfaceProjectionAlignmentScenario, + DogfoodPythonRealRepoEvalScenario, DogfoodRealRepairAttemptScenario, DogfoodReportInputs, + DogfoodReportPacketIndexRun, DogfoodRun, DogfoodSurfaceProjectionAlignmentScenario, DogfoodTypescriptPreviewRepairLoopScenario, DogfoodUserSurfaceProjectionScenario, EVIDENCE_QUALITY_SCORECARD_AUDIT_REGENERATION_FAILED, EVIDENCE_QUALITY_TREND_PREVIOUS_ARTIFACT_UNAVAILABLE, EvidenceQualityScorecardInput, @@ -60742,15 +61437,15 @@ mod tests { GENERATED_CI_FIRST_PR_REPAIR, GENERATED_CI_FRONT_PANEL_REPAIR, GENERATED_CI_PACKET_INDEX_REPAIR, GhPrStatusPullRequest, GhPrStatusReview, Lane1EvidenceAuditRepoExposureGeneration, Lane1EvidenceAuditRepoExposureOutcome, - LocalContextAllow, LspCockpitFixture, LspCockpitReport, MarkdownLink, PrTriageCheck, - PrTriageFinding, PrTriagePullRequest, REAL_REPAIR_ATTEMPTS_CORPUS, - REAL_REPAIR_ATTEMPTS_REQUIRED_CASES, REPO_BADGE_ARTIFACT_DEFAULT_TIMEOUT_MS, - REPO_BADGE_ARTIFACT_TIMEOUT_ENV, ReceiptRecord, RepoBadgeArtifactOptions, - RepoExposureLatencyReport, RepoExposureLatencyRun, RepoExposureLatencyTrace, - ReportIndexCampaign, ReportIndexEntry, ReportIndexRepoOpsArtifact, - RiprSwarmReadinessNextActionSources, SUPPORT_TIERS_PATH, SarifPolicyMode, - SarifPolicyResult, SarifPolicyThreshold, StaticLanguageAllowEntry, StaticLanguageMatcher, - TYPESCRIPT_PREVIEW_REPAIR_LOOP_REQUIRED_CASES, TestOracleClass, + LocalContextAllow, LspCockpitFixture, LspCockpitReport, MarkdownLink, + PYTHON_REAL_REPO_EVAL_REQUIRED_CASES, PrTriageCheck, PrTriageFinding, PrTriagePullRequest, + REAL_REPAIR_ATTEMPTS_CORPUS, REAL_REPAIR_ATTEMPTS_REQUIRED_CASES, + REPO_BADGE_ARTIFACT_DEFAULT_TIMEOUT_MS, REPO_BADGE_ARTIFACT_TIMEOUT_ENV, ReceiptRecord, + RepoBadgeArtifactOptions, RepoExposureLatencyReport, RepoExposureLatencyRun, + RepoExposureLatencyTrace, ReportIndexCampaign, ReportIndexEntry, + ReportIndexRepoOpsArtifact, RiprSwarmReadinessNextActionSources, SUPPORT_TIERS_PATH, + SarifPolicyMode, SarifPolicyResult, SarifPolicyThreshold, StaticLanguageAllowEntry, + StaticLanguageMatcher, TYPESCRIPT_PREVIEW_REPAIR_LOOP_REQUIRED_CASES, TestOracleClass, USER_SURFACE_PROJECTION_REQUIRED_RUN_STATUSES, USER_SURFACE_PROJECTION_REQUIRED_SURFACES, WorktreeDoctorFinding, WorktreeDoctorSeverity, actionable_gap_outcomes_json, actionable_gap_outcomes_markdown, actionable_gap_outcomes_report_from_values, @@ -60779,6 +61474,7 @@ mod tests { dogfood_language_preview_run, dogfood_language_preview_scenarios, dogfood_pr_inline_comment_run, dogfood_pr_inline_comment_scenarios, dogfood_pr_review_front_panel_run, dogfood_pr_review_front_panel_scenarios, + dogfood_python_real_repo_eval_run, dogfood_python_real_repo_eval_scenarios, dogfood_real_repair_attempt_run, dogfood_real_repair_attempt_scenarios, dogfood_report_json, dogfood_report_markdown, dogfood_report_packet_index_run, dogfood_report_packet_index_scenarios, dogfood_surface_projection_alignment_run, @@ -68959,6 +69655,47 @@ fn exact_owner_call_has_external_expected_value() { reason: "real merged repair-loop PR improved route-quality evidence".to_string(), errors: Vec::new(), }; + let python_real_repo_eval_run = super::DogfoodPythonRealRepoEvalRun { + name: "tiny_controlled_pytest_boundary_receipt".to_string(), + repo_shape: "tiny_controlled_pytest".to_string(), + source_kind: "scratch_repo".to_string(), + source_ref: "target/ripr/python-real-repo-evals/tiny-controlled-pytest-receipt" + .to_string(), + command: "ripr check --root target/ripr/python-real-repo-evals/tiny-controlled-pytest-receipt --base HEAD~1 --format json".to_string(), + runtime_ms: 114, + top_finding_summary: + "Python predicate-boundary repair card for calculate_discount amount >= threshold" + .to_string(), + canonical_gap_id: + "gap:python:app/pricing.py:calculate_discount:predicate_boundary:predicate:amount>=threshold" + .to_string(), + repair_card_present: true, + repair_action: "strengthen_existing_test".to_string(), + changed_owner: "python:app/pricing.py::calculate_discount".to_string(), + missing_discriminator: "amount == threshold".to_string(), + suggested_test_file: "tests/test_pricing.py".to_string(), + suggested_test_name: "test_calculate_discount_smoke".to_string(), + verify_command: "pytest tests/test_pricing.py::test_calculate_discount_smoke" + .to_string(), + verify_result: "pass".to_string(), + verify_summary: "1 passed in 0.30s".to_string(), + after_command: "ripr check --root target/ripr/python-real-repo-evals/tiny-controlled-pytest-receipt --base HEAD~1 --format json".to_string(), + after_runtime_ms: 58, + receipt_command: "ripr outcome --before before-check.json --after after-check.json --format json".to_string(), + receipt_result: "pass".to_string(), + gap_movement: "closed".to_string(), + closed_gaps: 1, + usability: "usable".to_string(), + false_positive_notes: "none observed".to_string(), + limitation_notes: "normal pytest app, API, CLI/tooling, and mixed repo dogfood remain outstanding".to_string(), + claim_boundary: vec![ + "Python remains preview/advisory".to_string(), + "No arbitrary imports or tests were run by RIPR".to_string(), + "No support-tier promotion".to_string(), + ], + reason: "sample Python real-repo eval receipt".to_string(), + errors: Vec::new(), + }; let typescript_preview_repair_loop_run = super::DogfoodTypescriptPreviewRepairLoopRun { name: "typescript_boundary_predicate_proof".to_string(), source_fixture: "fixtures/typescript_boundary_gap".to_string(), @@ -69084,6 +69821,7 @@ fn exact_owner_call_has_external_expected_value() { let finding_alignment_runs = [finding_alignment_run]; let surface_projection_alignment_runs = [surface_projection_alignment_run]; let real_repair_attempt_runs = [real_repair_attempt_run]; + let python_real_repo_eval_runs = [python_real_repo_eval_run]; let typescript_preview_repair_loop_runs = [typescript_preview_repair_loop_run]; let user_surface_projection_runs = [user_surface_projection_run]; let preview_projection_runs = DogfoodPreviewProjectionRuns { @@ -69110,6 +69848,7 @@ fn exact_owner_call_has_external_expected_value() { finding_alignment_runs: &finding_alignment_runs, surface_projection_alignment_runs: &surface_projection_alignment_runs, real_repair_attempt_runs: &real_repair_attempt_runs, + python_real_repo_eval_runs: &python_real_repo_eval_runs, typescript_preview_repair_loop_runs: &typescript_preview_repair_loop_runs, user_surface_projection_runs: &user_surface_projection_runs, pr_inline_comment_runs: &markdown_pr_inline_comment_runs, @@ -69131,6 +69870,7 @@ fn exact_owner_call_has_external_expected_value() { finding_alignment_runs: &finding_alignment_runs, surface_projection_alignment_runs: &surface_projection_alignment_runs, real_repair_attempt_runs: &real_repair_attempt_runs, + python_real_repo_eval_runs: &python_real_repo_eval_runs, typescript_preview_repair_loop_runs: &typescript_preview_repair_loop_runs, user_surface_projection_runs: &user_surface_projection_runs, pr_inline_comment_runs: &empty_pr_inline_comment_runs, @@ -69151,6 +69891,7 @@ fn exact_owner_call_has_external_expected_value() { assert!(markdown.contains("Finding Alignment Receipts")); assert!(markdown.contains("Surface Projection Alignment Receipts")); assert!(markdown.contains("Real Repair Attempt Receipts")); + assert!(markdown.contains("Python Real-Repo Eval Receipts")); assert!(markdown.contains("TypeScript Preview Repair-Loop Receipts")); assert!(markdown.contains("User Surface Projection Alignment Receipts")); assert!(markdown.contains("PR Inline Comment Publisher Receipts")); @@ -69174,8 +69915,10 @@ fn exact_owner_call_has_external_expected_value() { assert!(json.contains("\"finding_alignment\"")); assert!(json.contains("\"surface_projection_alignment\"")); assert!(json.contains("\"real_repair_attempts\"")); + assert!(json.contains("\"python_real_repo_evals\"")); assert!(json.contains("\"typescript_preview_repair_loop\"")); assert!(json.contains("\"repair_route_quality_metrics_improved\"")); + assert!(json.contains("\"tiny_controlled_pytest_boundary_receipt\"")); assert!(json.contains("\"typescript_boundary_predicate_proof\"")); assert!(json.contains("\"user_surface_projection_alignment\"")); assert!(json.contains("\"badge_actionable_count_from_canonical_state\"")); @@ -69347,6 +70090,37 @@ fn exact_owner_call_has_external_expected_value() { real_attempt_case.get("outcome").and_then(Value::as_str), Some("evidence_improved") ); + let python_evals = value + .get("python_real_repo_evals") + .ok_or_else(|| "python_real_repo_evals section missing".to_string())?; + assert_eq!( + python_evals.get("receipt_dir").and_then(Value::as_str), + Some("fixtures/python-real-repo-evals") + ); + let python_eval_summary = python_evals + .get("summary") + .ok_or_else(|| "python_real_repo_evals summary missing".to_string())?; + assert_eq!( + python_eval_summary.get("closed").and_then(Value::as_u64), + Some(1) + ); + let python_eval_cases = python_evals + .get("cases") + .and_then(Value::as_array) + .ok_or_else(|| "python_real_repo_evals cases missing".to_string())?; + assert_eq!(python_eval_cases.len(), 1); + assert_eq!( + python_eval_cases[0] + .get("gap_movement") + .and_then(Value::as_str), + Some("closed") + ); + assert_eq!( + python_eval_cases[0] + .get("missing_discriminator") + .and_then(Value::as_str), + Some("amount == threshold") + ); let typescript_preview_repair_loop = value .get("typescript_preview_repair_loop") .ok_or_else(|| "typescript_preview_repair_loop section missing".to_string())?; @@ -70040,6 +70814,118 @@ fn exact_owner_call_has_external_expected_value() { )); } + #[test] + fn dogfood_python_real_repo_eval_receipts_are_checked() -> Result<(), String> { + with_repo_cwd(|| { + let scenarios = dogfood_python_real_repo_eval_scenarios(); + for required in PYTHON_REAL_REPO_EVAL_REQUIRED_CASES { + assert!( + scenarios.iter().any(|scenario| { + scenario.name == required.0 && scenario.gap_movement == required.1 + }), + "{} Python real-repo eval receipt should be checked as {}", + required.0, + required.1 + ); + } + assert!( + scenarios + .iter() + .any(|scenario| scenario.repo_shape == "tiny_controlled_pytest"), + "Python real-repo eval receipts should include the tiny controlled pytest case" + ); + assert!( + scenarios + .iter() + .any(|scenario| scenario.gap_movement == "closed"), + "Python real-repo eval receipts should include a closed gap" + ); + + for scenario in scenarios { + let run = dogfood_python_real_repo_eval_run(&scenario); + assert!( + run.errors.is_empty(), + "{} Python real-repo eval receipt should validate: {:?}", + run.name, + run.errors + ); + } + + Ok(()) + }) + } + + fn valid_python_real_repo_eval_scenario() -> DogfoodPythonRealRepoEvalScenario { + DogfoodPythonRealRepoEvalScenario { + name: "tiny_controlled_pytest_boundary_receipt".to_string(), + repo_shape: "tiny_controlled_pytest".to_string(), + source_kind: "scratch_repo".to_string(), + source_ref: "target/ripr/python-real-repo-evals/tiny-controlled-pytest-receipt" + .to_string(), + command: "ripr check --root target/ripr/python-real-repo-evals/tiny-controlled-pytest-receipt --base HEAD~1 --format json".to_string(), + runtime_ms: 114, + top_finding_summary: + "Python predicate-boundary repair card for calculate_discount amount >= threshold" + .to_string(), + canonical_gap_id: + "gap:python:app/pricing.py:calculate_discount:predicate_boundary:predicate:amount>=threshold" + .to_string(), + repair_card_present: true, + repair_action: "strengthen_existing_test".to_string(), + changed_owner: "python:app/pricing.py::calculate_discount".to_string(), + missing_discriminator: "amount == threshold".to_string(), + suggested_test_file: "tests/test_pricing.py".to_string(), + suggested_test_name: "test_calculate_discount_smoke".to_string(), + verify_command: "pytest tests/test_pricing.py::test_calculate_discount_smoke" + .to_string(), + verify_result: "pass".to_string(), + verify_summary: "1 passed in 0.30s".to_string(), + after_command: "ripr check --root target/ripr/python-real-repo-evals/tiny-controlled-pytest-receipt --base HEAD~1 --format json".to_string(), + after_runtime_ms: 58, + receipt_command: + "ripr outcome --before before-check.json --after after-check.json --format json" + .to_string(), + receipt_result: "pass".to_string(), + gap_movement: "closed".to_string(), + closed_gaps: 1, + usability: "usable".to_string(), + false_positive_notes: "none observed".to_string(), + limitation_notes: + "normal pytest app, API, CLI/tooling, and mixed repo dogfood remain outstanding" + .to_string(), + claim_boundary: vec![ + "Python remains preview/advisory".to_string(), + "No arbitrary imports or tests were run by RIPR".to_string(), + "No support-tier promotion".to_string(), + ], + reason: "tiny controlled repo proved one Python repair card closes with receipt" + .to_string(), + } + } + + #[test] + fn dogfood_python_real_repo_eval_rejects_overclaiming() { + let mut scenario = valid_python_real_repo_eval_scenario(); + scenario.canonical_gap_id = "gap:rust:src/lib.rs:predicate_boundary".to_string(); + scenario.changed_owner = "app/pricing.py::calculate_discount".to_string(); + scenario.repair_card_present = false; + scenario.gap_movement = "closed".to_string(); + scenario.closed_gaps = 0; + scenario.verify_result = "not_run".to_string(); + scenario.claim_boundary.clear(); + + let report = dogfood_python_real_repo_eval_run(&scenario) + .errors + .join("\n"); + + assert!(report.contains("canonical_gap_id must use gap:python")); + assert!(report.contains("changed_owner must use python: identity")); + assert!(report.contains("repair_card_present must be true")); + assert!(report.contains("closed gap movement must record closed_gaps > 0")); + assert!(report.contains("closed gap movement requires verify_result=pass")); + assert!(report.contains("claim_boundary must keep preview boundary denials visible")); + } + #[test] fn dogfood_typescript_preview_repair_loop_receipts_are_checked() -> Result<(), String> { with_repo_cwd(|| {