Repository navigation
feat(repair): establish producer-owned Rust route readiness - #1563
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThis change adds producer-owned repair-route readiness and test-target provenance, uses them to gate repair projections and actionability, extends targeted-rerun parity output, and updates review guidance, schemas, documentation, tests, and expected fixtures. ChangesRepair-route readiness
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant RustIndex
participant TestGripEvidence
participant RepairRoute
participant EvidenceRecord
participant ReviewComments
RustIndex->>TestGripEvidence: resolve test target identity
TestGripEvidence->>RepairRoute: provide producer-owned evidence
RepairRoute->>EvidenceRecord: return readiness and missing evidence
EvidenceRecord->>ReviewComments: provide actionability and limitations
ReviewComments-->>ReviewComments: render repair or inspection guidance
Possibly related issues
Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the evidence record logic to fail closed with a static limitation when there is no producer-owned discriminator or when the suggested test target resolves to the production seam. It also updates review comments to avoid projecting static limitations as repair guidance and documents these learnings. Feedback on these changes suggests addressing redundant filesystem I/O in has_distinct_test_target by avoiding duplicate calls to recommended_test_for, and refining the fallback prompt logic in review_comments.rs to prevent misleading prompts when the gap state is not a static limitation.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 517092a432
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
Current-head handoff: 4b18ad8cfb8bcf102050c7a7fb9b6440a92da7d has all required checks green, including Ripr Rust Small Result. The PR is mergeable, but |
Correction pushed:
|
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/ripr/src/analysis/repair_route.rs`:
- Around line 43-70: Align the evidence label in value_route_readiness with the
required_evidence entry: define and reuse the specific “producer discriminator”
description for required_evidence, present_evidence, and missing_evidence.
Preserve the existing readiness state and branching behavior while ensuring
satisfied and missing entries match required_evidence textually.
- Around line 172-203: Update existing_test_target and current_oracle to select
one shared RelatedTestGrip matching the direct-owner requirement and test-target
availability, then derive both test_target and oracle_kind from that same match.
Ensure RepairRouteReadiness cannot combine fields from different related_tests.
In `@crates/ripr/src/analysis/test_grip_evidence.rs`:
- Around line 79-99: Make the fields of TestTargetEvidence private and add a
crate-visible constructor that creates index-backed evidence with
TestTargetProvenance::RustIndexFunction. Update callers to use this constructor
rather than struct literals, while preserving the existing test-only fixture()
constructor and its FixtureOnly provenance.
In `@crates/ripr/src/app/agent_brief.rs`:
- Around line 774-780: Keep the producer-owned TestTargetEvidence in sync with
the related_test helper’s final locator: whenever related_test updates
RelatedTestGrip.file or line, rebuild or update test_target with the same file
and line instead of retaining tests/sample.rs:5. Update the related-test
construction flow around the shown test_target assignment and related_test
helper so downstream recommended_test_for and actionability logic receive one
consistent target identity.
In `@crates/ripr/src/output/agent_seam_packets.rs`:
- Around line 1377-1386: Update task_for and recommended_test_for to fail closed
when related_test_target_identity() returns Unresolved: task_for must return
inspect_static_limitation, and recommended_test_for must return not_applicable
instead of projecting or advertising a targeted test repair. Preserve existing
behavior for resolved targets and other classifications.
In `@crates/ripr/src/output/repo_exposure.rs`:
- Around line 931-937: Update the normalization setup in
repo_exposure_json_normalizes_seam_and_related_test_paths to rewrite the
fixture’s producer-owned test_target alongside related_tests[0].file, keeping
its path and line aligned with the normalized related-test record.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: af9586f2-c948-4c2e-8429-bce273e88d2c
📒 Files selected for processing (39)
crates/ripr/src/analysis/mod.rscrates/ripr/src/analysis/repair_route.rscrates/ripr/src/analysis/test_grip_evidence.rscrates/ripr/src/analysis/test_grip_evidence/tests.rscrates/ripr/src/app/agent_brief.rscrates/ripr/src/lsp/hover.rscrates/ripr/src/lsp/tests.rscrates/ripr/src/output/agent_brief.rscrates/ripr/src/output/agent_seam_packets.rscrates/ripr/src/output/badge/tests.rscrates/ripr/src/output/evidence_health.rscrates/ripr/src/output/evidence_record.rscrates/ripr/src/output/gate/tests.rscrates/ripr/src/output/pilot/tests.rscrates/ripr/src/output/repo_exposure.rscrates/ripr/src/output/review_comments.rscrates/ripr/src/output/sarif.rsdocs/LEARNINGS.mdfixtures/boundary_gap/expected/calibrated-gate/acknowledged-waiver/gate-decision.jsonfixtures/boundary_gap/expected/calibrated-gate/acknowledged-waiver/gate-decision.mdfixtures/boundary_gap/expected/calibrated-gate/baseline-check-existing/gate-decision.jsonfixtures/boundary_gap/expected/calibrated-gate/baseline-check-existing/gate-decision.mdfixtures/boundary_gap/expected/calibrated-gate/calibrated-high-confidence-new-gap/gate-decision.jsonfixtures/boundary_gap/expected/calibrated-gate/calibrated-high-confidence-new-gap/gate-decision.mdfixtures/boundary_gap/expected/calibrated-gate/calibration-disagreement/gate-decision.jsonfixtures/boundary_gap/expected/calibrated-gate/calibration-disagreement/gate-decision.mdfixtures/boundary_gap/expected/calibrated-gate/visible-only-advisory/gate-decision.jsonfixtures/boundary_gap/expected/calibrated-gate/visible-only-advisory/gate-decision.mdfixtures/boundary_gap/expected/lsp-code-actions.jsonfixtures/boundary_gap/expected/pr-guidance/capped/comments.jsonfixtures/boundary_gap/expected/pr-guidance/capped/comments.mdfixtures/boundary_gap/expected/pr-guidance/exact-line/comments.jsonfixtures/boundary_gap/expected/pr-guidance/exact-line/comments.mdfixtures/boundary_gap/expected/pr-guidance/owner-function-line/comments.jsonfixtures/boundary_gap/expected/pr-guidance/owner-function-line/comments.mdfixtures/boundary_gap/expected/pr-guidance/same-file-line/comments.jsonfixtures/boundary_gap/expected/pr-guidance/same-file-line/comments.mdfixtures/boundary_gap/expected/pr-guidance/summary-only/comments.jsonfixtures/boundary_gap/expected/pr-guidance/summary-only/comments.md
Current-head proof receiptHead |
Current-head technical review — d4e328cReview pass was non-mutating: the reviewed head is d4e328c, the worktree was clean, and no branch mutation occurred during review. FindingsP1 — unresolved test targets still produce a repair-looking LSP briefrepair_route_readiness correctly returns a missing target when producer evidence has no TestTargetEvidence. However, recommended_test_for still returns the related test path with target_kind = Unresolved, targeted_test_brief_outline_for_classified_seam consumes that value without checking shared readiness, and push_seam_actions offers the targeted-test brief whenever any related test exists. The existing LSP regression constructs test_target: None and explicitly requires that brief action. That path can render “Add a targeted test” with a concrete suggested file even though the route is StaticLimitation and no producer-owned edit target exists. This violates the fail-closed target contract and lets a downstream surface turn navigation evidence into repair guidance. Evidence: readiness target requirement, unresolved projection, brief outline, LSP action gate, and passing regression with no target. Required correction: emit a repair brief or suggested file only for shared RepairRouteState::Ready with Existing or Proposed target selection. Keep a separate navigation-only action for a related test whose identity is unresolved, and add a regression that the brief contains no edit target or “Add a targeted test” language in that case. P1 — discriminator compatibility is not exact or typedThe readiness authority calls has_exact_discriminator, but discriminator_fact_matches reduces the required fact to strings and uses substring matching. Boundary routes compare only the last significant token with fact.contains(token); the other families use contains_all_tokens, which also uses substring containment. A producer fact such as discount_threshold_backup or an otherwise unrelated fact containing the required tokens can therefore satisfy the readiness gate and promote a route to Ready. That is the token-coincidence false-promotion family the repository’s analyzer rules identify as actionability-critical. Evidence: string/token matcher. Required correction: carry typed producer discriminator identity or a producer-owned compatibility key, match it against the seam’s RequiredDiscriminator, and add adversarial near-match and wrong-owner regressions for every value/branch family. A non-empty or token-compatible string must not unlock a repair route. P2 — producer ownership is documented but not enforced by the type boundaryTestTargetEvidence and all of its fields are pub(crate), so output modules can construct or alter a purported RustIndex identity. Current production call sites do not appear to fabricate one, but the compiler does not enforce the stated producer-only boundary. Evidence: target evidence type. Recommended hardening: keep fields private, provide an analysis-side RustIndex constructor, and retain fixture construction behind test-only helpers. Verification observed
Technical and governance dispositionTechnical verdict: not ready to merge until the two P1 findings are corrected and re-proved on a fresh head. The review pass itself did not mutate the branch. Governance condition: independently, GitHub still requires one approving review; the raw protection endpoint reports required_approvals = 1, dismiss_stale = false, require_last_push = false, and the only collaborator is EffortlessSteven. Existing reviews are comments only and reviewDecision is empty. No self-approval or administrative bypass is being used. Claim boundary: this review covers the producer-owned Rust route authority and its projections on this exact SHA. It does not establish the dogfood corpus, CallPresence adoption proof, or campaign closeout. |
|
Current-head review request for |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/ripr/src/output/pilot/render/complete.rs`:
- Around line 312-318: Reuse the previously computed outline in the rendering
flow instead of calling targeted_test_brief_outline_for_classified_seam(entry)
again. Capture a boolean indicating whether outline.suggested_file is
"not_applicable" in the earlier top.first() block, then use that flag in the
later message-selection condition while preserving the existing output strings.
In `@crates/ripr/src/output/pilot/render/render_helpers.rs`:
- Around line 75-86: Replace the repeated "not_applicable" string comparisons
with a shared readiness accessor on TargetedTestBriefOutline, such as
is_not_applicable(), and use it in this renderer and both checks in complete.rs.
Keep the existing formatted output and fail-closed behavior unchanged while
centralizing sentinel handling behind the accessor.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d3af2403-48a1-4942-8f1c-d91124cab8c0
📒 Files selected for processing (3)
crates/ripr/src/output/pilot/render/complete.rscrates/ripr/src/output/pilot/render/render_helpers.rscrates/ripr/src/output/pilot/tests.rs
…ot' into fix/fail-closed-repair-route-pilot
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a3ca055849
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Current-head technical review record
|
|
Current-head independent review request for |
|
Current-head review refresh
|
What this does
RIPR now treats Rust repair actionability as a producer-owned route, not a renderer inference. A repair projection is available only when the shared analysis authority has a compatible discriminator, indexed test-target identity, coherent route evidence, and a complete verification path.
Fix: centralize route readiness in
analysis::repair_route, preserve typed target and discriminator identity through packets, LSP, pilot output, and targeted rerun, and fail closed for unknown or opaque routes. Producer equality facts are accepted only when their normalized operands match the required boundary. Limited routes retain investigation evidence but expose no write, assertion, verify, or receipt guidance.Verification
Ripr Rust Small Result437b69e78fc28babeb5be4d1174ccb9376696ddeReview map
analysis/repair_route.rs: sole readiness authority, typed target selection, classifier ceiling, and exact discriminator compatibility.analysis/test_grip_evidence.rs: RustIndex-backed test-target identity and fixture-only provenance.output/agent_seam_packets.rs, pilot, LSP, and rerun consumers: project readiness without reconstructing route facts.fixturesanddocs/REPO_SETTINGS.md: regression contracts and the classic-protection/ruleset policy split.Out of scope