Repository navigation
feat(output): repair cards and gate routes start the agent repair for eligible seams - #3936
Conversation
…outes Where a review card, gate repair route, or inline PR comment already names a seam that passes the repair-packet flip, lead with `ripr agent repair --root . --seam-id <id> --phase before` instead of the snapshot verify command. The command is computed once in evidence_record::canonical_repair_command_for, gated on repair_packet_eligibility(entry).eligible(), and carried (never derived) by review_comments, the gate repair route, and the inline comment publisher. Non-actionable routes and gap-record routes emit nothing and keep the existing verify guidance. Refs #3906 (outcome 3, gate and repair-card surfaces). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK
…e flip The repo-exposure evidence record, the dogfood gate-adoption receipts, and the gate-decision verification fixture now carry repair_command. The first-useful-action unchanged-after-attempt snapshots are regenerated through the corpus test's own normalizer, and the verify and receipt artifacts are rebound to the new snapshot bytes; their movement is unchanged. The evidence-record test now calls the builder with an actionable state directly, so removing the eligibility check fails it. Refs #3906. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm gate and inline publisher carry, not derive: review_card_route_facts reads /llm_guidance/repair_command; gap_record_route_facts forces None (repo-scoped records never gate candidates, PR-local records lack seam-id). repair_route.rs::review_card_repair_start_is_carried_not_derived enforces both.
- Confirm first-useful-action/unchanged-after-attempt fixtures rebind content_sha256 and after_artifact/before_artifact/verify_artifact sha256 to bytes that include the new repair_command key. Movement classification (unchanged, weak→weak) is preserved per the PR description; worth confirming the rebind is byte-for-byte consistent.
Refuted
- review-comments schema requires llm_guidance.repair_command, so non-eligible cards would now fail schema validation.; refuted because: Field is added to properties with type=string minLength=1 but not to the required array of the parent llm_guidance object; summary-only fixture and gate_baseline fixtures still omit it without breaking.
Parked follow-ups
- PR description claims every producer in this PR coincides on actionable AND eligible today; review_comments.rs still references the older CROSS_LANGUAGE_TARGET_UNRESOLVED_CATEGORY path in the same module (imported but unchanged). Worth a follow-up issue if actionability ever widens so the flip and actionability can diverge; not a current bug.
- Inline comment refers to
--phase afterin prose, which depends on the agent repair CLI flag name. If that flag is renamed in the same release line that ships this PR, the comment will drift silently because the fixture only pins the before-phase command. Worth a follow-up to either pin the after-phase flag in the body or gate the prose on a constant rather than a literal.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
|
Answers to the two verification questions from the review bot:
Parked items: the Generated by Claude Code |
… CI comments with it agent repair refuses an edit target outside a test surface, so a seam whose recommended test lives in an inline #[cfg(test)] module was offered a repair start it could not use. repair_start_command_for now also requires the recommended test file to be a test surface, and canonical_repair_command_for goes through it. The generated CI's compact inline comment headline read only the Verify line, so a card carrying "Start the repair:" still led with Verify. The jq now captures the repair start and leads with it when present. Refs #3906 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK
…e-repair-route # Conflicts: # crates/ripr/src/output/gate/tests.rs
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Exact-head repair-route review — REVIEW_READY
Reviewed head fcf2e0f721f762a55af8730f06a505aa816b22e0 against #3906 outcome 3 and the #3797 installed-loop boundary.
Accepted semantic owner
output::evidence_record::repair_start_command_for is the single builder. It emits a start command only when:
- the existing fail-closed
repair_packet_eligibility(entry)authority says the seam is eligible; and - the recommended edit target is an accepted test surface.
canonical_repair_command_for adds the public actionable-state requirement. Review cards, gate routes, inline comments, and generated CI carry that value rather than re-deriving eligibility.
Failure-path review
- Cross-language/static-limitation seams under-emit and retain the pre-existing verify/inspect route.
- An inline
#[cfg(test)]target can pass the flip but still receives no command because the transaction itself would refuse the edit target. - Repo/PR gap-record routes without a canonical seam id remain null rather than fabricating one.
- Existing verify and receipt commands remain present for the lower-level loop and non-repairable routes.
Evidence inspected
- Focused positive and negative controls distinguish eligible, ineligible, and non-test-surface seams.
- Consumer tests prove carried-not-derived behavior through gate presentation, inline publication, and generated CI.
- Schemas and output documentation describe the additive fields; regenerated fixtures cover all affected surfaces.
- Required Rust CI is successful; Devin and CodeRabbit statuses are successful; no unresolved review threads exist.
- The PR is mergeable on current
main; unrelated movement does not change the semantic owner or accepted claim.
Non-claims
This is a partial #3906 delivery. Pilot, agent status, first-pr/pr-summary, LSP/editor, the complete repair/resume journey, and exact-candidate qualification remain separately owned. Windows native execution is not claimed by this PR.
Disposition: REVIEW_READY for protected squash merge.
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- The schema change adds repair_command to gate-decision.required. Any producer emitting a complete repair route without a repair command (e.g. gap-ledger route) must now emit an explicit
null; today the diff wires this correctly via gap_record_route_facts repair_command: None, but a future repo-scoped gap-ledger producer could regress by omitting the key and failing schema validation rather than producingnull.
Verification questions
- Confirm schema asymmetry: gate-decision lists repair_command under required[], review-comments keeps llm_guidance.repair_command optional. Inconsistent semantics: gate route may have null command, card may omit it entirely.
- Confirm jq regex
Start the repair:\n\u0060(?[^\u0060]+)\u0060 will match a body whose value contains a backtick only up to the first backtick; currently safe because repair_start_command_for wraps shell_arg(seam_id) and seam ids are hex, but coupling is implicit. - Confirm first-useful-action/unchanged-after-attempt rebinds content_sha256 and after/before/verify sha256, but the diff also embeds the new repair_command inside the snapshot bytes that those hashes cover; movement classification must remain unchanged-after-attempt.
Refuted
- Box<[u8]>::from(slice) allocation failure could cause repair_start_command_for to panic and surface a wrong actionable signal; refuted because: repair_start_command_for returns Option via format!, never constructs a Box<[u8]>; the diff does not allocate a heap buffer from a slice and never relies on Box::from(slice) for the new path. Allocation-failure analysis is out of scope for this PR.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
`cargo test -p ripr --lib` does not compile on main since 64f3b92. #3936 added `repair_route_leads_with_the_repair_start_when_carried`, which calls `push_repair_route(out, route)`. #3968, branched before #3936 landed, added a third `changed_line_anchored: bool` parameter. Each PR was green on its own base; the combined tree fails with E0061 at output/gate/presentation.rs:630 and :642. The test now passes `true`. The start-repair line it pins does not depend on the flag. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK (cherry picked from commit 9884f9b)
`cargo test -p ripr --lib` does not compile on main since 64f3b92. #3936 added `repair_route_leads_with_the_repair_start_when_carried`, which calls `push_repair_route(out, route)`. #3968, branched before #3936 landed, added a third `changed_line_anchored: bool` parameter. Each PR was green on its own base; the combined tree fails with E0061 at output/gate/presentation.rs:630 and :642. The test now passes `true`. The start-repair line it pins does not depend on the flag. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK (cherry picked from commit 9884f9b)
`cargo test -p ripr --lib` does not compile on main since 64f3b92. #3936 added `repair_route_leads_with_the_repair_start_when_carried`, which calls `push_repair_route(out, route)`. #3968, branched before #3936 landed, added a third `changed_line_anchored: bool` parameter. Each PR was green on its own base; the combined tree fails with E0061 at output/gate/presentation.rs:630 and :642. The test now passes `true`. The start-repair line it pins does not depend on the flag. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK (cherry picked from commit 9884f9b)
`cargo test -p ripr --lib` does not compile on main since 64f3b92. #3936 added `repair_route_leads_with_the_repair_start_when_carried`, which calls `push_repair_route(out, route)`. #3968, branched before #3936 landed, added a third `changed_line_anchored: bool` parameter. Each PR was green on its own base; the combined tree fails with E0061 at output/gate/presentation.rs:630 and :642. The test now passes `true`. The start-repair line it pins does not depend on the flag. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK (cherry picked from commit 9884f9b)
`cargo test -p ripr --lib` does not compile on main since 64f3b92. #3936 added `repair_route_leads_with_the_repair_start_when_carried`, which calls `push_repair_route(out, route)`. #3968, branched before #3936 landed, added a third `changed_line_anchored: bool` parameter. Each PR was green on its own base; the combined tree fails with E0061 at output/gate/presentation.rs:630 and :642. The test now passes `true`. The start-repair line it pins does not depend on the flag. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK (cherry picked from commit 9884f9b)
… repair_command The rebuild at 25d3f0f regenerated these snapshots for input:v4 from a base that predated #3936, so the committed before/after repo-exposure files lacked the `repair_command` that production now emits for seam 67fc764ba37d77bd, and `first_useful_action_corpus_pins_routing_cases` failed on the branch. Regenerated from the test's own normalizer over real `ripr check` output; the only content change is the added `repair_command` line and the content commitment it moves. agent-verify and agent-receipt carry the new content and file hashes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK
…d repair (#3960) * feat(output): carry the agent repair start on repair cards and gate routes Where a review card, gate repair route, or inline PR comment already names a seam that passes the repair-packet flip, lead with `ripr agent repair --root . --seam-id <id> --phase before` instead of the snapshot verify command. The command is computed once in evidence_record::canonical_repair_command_for, gated on repair_packet_eligibility(entry).eligible(), and carried (never derived) by review_comments, the gate repair route, and the inline comment publisher. Non-actionable routes and gap-record routes emit nothing and keep the existing verify guidance. Refs #3906 (outcome 3, gate and repair-card surfaces). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * test(output): rebind fixtures to the carried repair start and bind the flip The repo-exposure evidence record, the dogfood gate-adoption receipts, and the gate-decision verification fixture now carry repair_command. The first-useful-action unchanged-after-attempt snapshots are regenerated through the corpus test's own normalizer, and the verify and receipt artifacts are rebound to the new snapshot bytes; their movement is unchanged. The evidence-record test now calls the builder with an actionable state directly, so removing the eligibility check fails it. Refs #3906. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * fix(output): withhold the repair start for inline-test seams and lead CI comments with it agent repair refuses an edit target outside a test surface, so a seam whose recommended test lives in an inline #[cfg(test)] module was offered a repair start it could not use. repair_start_command_for now also requires the recommended test file to be a test surface, and canonical_repair_command_for goes through it. The generated CI's compact inline comment headline read only the Verify line, so a card carrying "Start the repair:" still led with Verify. The jq now captures the repair start and leads with it when present. Refs #3906 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * feat(output): start first-pr and pr-summary from a carried review-card repair Generated CI builds the gap ledger from repo-exposure, whose records are all repo-scoped, so `ripr first-pr` always fell to no_action for Rust even when the review-comments file held a card that passed the repair-packet flip. The review-comments input was only checked for existence. first-pr: when the ledger yields no top gap, read the review-comments input and select the first actionable card in comments[] then summary_only[] that carries a non-empty llm_guidance.repair_command. The command is carried byte-for-byte; first-pr never builds `agent repair` from a seam, gap, or probe id. Every selected field comes from that same card (source_artifact is the review-comments path, repair.route is AgentRepairTransaction, verify and receipt are the card's), never mixed with a ledger record. The card is used only when the report is tool=ripr, status=advisory, and names this invocation's root, base, and head; otherwise it fails closed to no_action. The selection keeps state top_gap so the editor projection and pr-summary consume it unchanged. receipt_path and agent_packet_command are null for a card selection: the card is not a ledger gap and first-pr does not parse commands for paths. selected.repair_command is present only when carried, so ledger-selected packets are byte-identical to before. The repair start is not added to `commands`: the VS Code first-pr projection fails the whole packet closed (unsafeCommand) on any `commands` value outside its allowlist, and `ripr agent repair` is not on it. CLI and Markdown render a "Start repair" line before Verify. A no_action reason now says why no card supplied a start and, when the cards are missing or were rendered from the gap ledger, names the seam-level `ripr review-comments --root --base --head --out` route. pr-summary: carry start-here selected.repair_command into TopRepair (never read review comments directly, which could mis-pair a card with start-here's top gap), render a "start repair" line before verify in both Markdown surfaces, and make it the first local reproduction command when present. Docs: OUTPUT_SCHEMA start-here and pr-evidence-summary contracts, FIRST_PR_WORKFLOW, RIPR-SPEC-0075 field tables. Refs #3906 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * test(first-pr): cover the head-mismatch refusal for review-card repair starts The fail-closed test covered base, status, root, scope and a missing report but not a report generated for another head. Removing the head check from review_comments_currentness_problem now fails it. Refs #3906 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * fix(test): pass the changed-line flag in the gate repair-start test `cargo test -p ripr --lib` does not compile on main since 64f3b92. #3936 added `repair_route_leads_with_the_repair_start_when_carried`, which calls `push_repair_route(out, route)`. #3968, branched before #3936 landed, added a third `changed_line_anchored: bool` parameter. Each PR was green on its own base; the combined tree fails with E0061 at output/gate/presentation.rs:630 and :642. The test now passes `true`. The start-repair line it pins does not depend on the flag. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK (cherry picked from commit 9884f9b) * test(fixtures): regenerate the packet-index Markdown goldens for the single Start here block #4011 made dogfood_report_packet_index_scenarios_have_checked_receipts render the corpus instead of comparing two goldens, and #3973 removed the second "Start here:" block from the rendered index. Each merged green against a main without the other, so main now fails that required xtask test on its first case. Regenerated all seven cases with the corpus canonical_command. Six index.md files lose the duplicate block; every index.json is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK (cherry picked from commit 3a0d679) * test(fixtures): rebless two check goldens blessed before the no-default-base change #4002 made CheckInput::default().base None and reblessed every --diff fixture on its base. #3944 (python_src_layout_package_import) and #3985 (tail_comparison_boundary) were blessed on bases without #4002, so each merged with "base": "origin/main" and base_revision "origin/main", and `cargo xtask goldens check` on main reports both as drift. Reblessed with a RIPR-SPEC-0084 reason; only base/base_revision change, the same delta #4002 applied to the other fixtures. goldens check: 0 drift entries. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK (cherry picked from commit 7930fef) --------- Co-authored-by: Claude <noreply@anthropic.com>
…el and the evidence ledger (#3962) * feat(output): carry the agent repair start on repair cards and gate routes Where a review card, gate repair route, or inline PR comment already names a seam that passes the repair-packet flip, lead with `ripr agent repair --root . --seam-id <id> --phase before` instead of the snapshot verify command. The command is computed once in evidence_record::canonical_repair_command_for, gated on repair_packet_eligibility(entry).eligible(), and carried (never derived) by review_comments, the gate repair route, and the inline comment publisher. Non-actionable routes and gap-record routes emit nothing and keep the existing verify guidance. Refs #3906 (outcome 3, gate and repair-card surfaces). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * test(output): rebind fixtures to the carried repair start and bind the flip The repo-exposure evidence record, the dogfood gate-adoption receipts, and the gate-decision verification fixture now carry repair_command. The first-useful-action unchanged-after-attempt snapshots are regenerated through the corpus test's own normalizer, and the verify and receipt artifacts are rebound to the new snapshot bytes; their movement is unchanged. The evidence-record test now calls the builder with an actionable state directly, so removing the eligibility check fails it. Refs #3906. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * feat(output): lead PR-review surfaces with the carried repair start First-useful-action, the PR-review front panel, the PR evidence ledger, and RIPR Zero status now lead with `ripr agent repair --root . --seam-id <id> --phase before` exactly when an input artifact already carries it, and never synthesize a repair-loop command from a bare seam id. The fail-closed decision stays with repair_packet_eligibility(..).eligible() upstream; these surfaces carry the string and do not re-run eligibility. First-useful-action: a new route ahead of the missing-assistant-proof route. When no assistant proof exists yet and the first review card (comments, then summary_only) carries a non-empty llm_guidance.repair_command, the report is `actionable` / `write_focused_test` with `commands.repair` set to that string and every `selected`/`target` field, verify, and receipt command taken from that same card. A fresh PR no longer asks for post-repair assistant proof before any repair exists. The same card without the command keeps the missing_required_artifact route; post-proof routing is unchanged. `commands.repair` is skipped when absent, so existing goldens are stable. Markdown adds a `Start Repair` section and a one-screen `Repair start` line. Generated CI's first-action summary and at-a-glance block print `.commands.repair` (template, test, and docs/CI.md mirror). Front panel: `top_issue.repair_command` is carried from first-action `commands.repair`, a card's `llm_guidance.repair_command`, or an acknowledged gate route's `repair_route.repair_command`. `agent_command` is that command, else a carried read-only inspection command (`commands.context_packet`, `llm_guidance.command`, or the gate route's `inspection_command`), else null. The three `agent start --seam-id` syntheses are gone. Markdown shows `Repair start` in the top issue and the Repair block. The invalid-improved assertion now pins the exact carried handoff instead of `is_some()`. Evidence ledger: `top_repair_route.repair_command` is carried from the card, gate route, or RIPR Zero route; the gap and baseline arms name no repair start and drop their synthesized `agent start` (verify kept). Also fixes the card receipt command, which cards put at the root, not under llm_guidance (kept as fallback), so it was always null. RIPR Zero status (item 4 decision): the gap-record arm synthesized `agent start --seam-id <canonical_gap_id>`, a gap id rather than a seam id; it now names none. The baseline arm carries `evidence_record.canonical_item.repair_command` when present, else null. Left in place: test_oracle_assistant_proof handoff. The proof is a post-attempt artifact (it needs before/after/receipt) and its handoff records the workflow that produced its --agent-packet input. assistant_loop_health derives every repair-queue command root from that field (command_root), so nulling it would regress those roots to `.`. It needs its own root carrier first; tracked as follow-up. Goldens: new first-useful-action/repair-start and pr-review-front-panel/repair-start cases (exact-line card carrying the command), regenerated through the production renderers. Front-panel actionable/blocked now show the carried context-packet command, acknowledged/summary-only show null, and the mixed ledger shows null; the mixed ripr-zero-status input is rebound to the producer contract. No hash-bound artifact changed. Refs #3906. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * fix(output): withhold the repair start for inline-test seams and lead CI comments with it agent repair refuses an edit target outside a test surface, so a seam whose recommended test lives in an inline #[cfg(test)] module was offered a repair start it could not use. repair_start_command_for now also requires the recommended test file to be a test surface, and canonical_repair_command_for goes through it. The generated CI's compact inline comment headline read only the Verify line, so a card carrying "Start the repair:" still led with Verify. The jq now captures the repair start and leads with it when present. Refs #3906 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * feat(output): start first-pr and pr-summary from a carried review-card repair Generated CI builds the gap ledger from repo-exposure, whose records are all repo-scoped, so `ripr first-pr` always fell to no_action for Rust even when the review-comments file held a card that passed the repair-packet flip. The review-comments input was only checked for existence. first-pr: when the ledger yields no top gap, read the review-comments input and select the first actionable card in comments[] then summary_only[] that carries a non-empty llm_guidance.repair_command. The command is carried byte-for-byte; first-pr never builds `agent repair` from a seam, gap, or probe id. Every selected field comes from that same card (source_artifact is the review-comments path, repair.route is AgentRepairTransaction, verify and receipt are the card's), never mixed with a ledger record. The card is used only when the report is tool=ripr, status=advisory, and names this invocation's root, base, and head; otherwise it fails closed to no_action. The selection keeps state top_gap so the editor projection and pr-summary consume it unchanged. receipt_path and agent_packet_command are null for a card selection: the card is not a ledger gap and first-pr does not parse commands for paths. selected.repair_command is present only when carried, so ledger-selected packets are byte-identical to before. The repair start is not added to `commands`: the VS Code first-pr projection fails the whole packet closed (unsafeCommand) on any `commands` value outside its allowlist, and `ripr agent repair` is not on it. CLI and Markdown render a "Start repair" line before Verify. A no_action reason now says why no card supplied a start and, when the cards are missing or were rendered from the gap ledger, names the seam-level `ripr review-comments --root --base --head --out` route. pr-summary: carry start-here selected.repair_command into TopRepair (never read review comments directly, which could mis-pair a card with start-here's top gap), render a "start repair" line before verify in both Markdown surfaces, and make it the first local reproduction command when present. Docs: OUTPUT_SCHEMA start-here and pr-evidence-summary contracts, FIRST_PR_WORKFLOW, RIPR-SPEC-0075 field tables. Refs #3906 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * test(first-pr): cover the head-mismatch refusal for review-card repair starts The fail-closed test covered base, status, root, scope and a missing report but not a report generated for another head. Removing the head check from review_comments_currentness_problem now fails it. Refs #3906 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * docs(schema): keep the front-panel vocabulary sentences in their own bullet The #3906 repair_command bullet was spliced mid-sentence into the typed one-screen vocabulary contract: the mirror/evidence-strength sentences described top_issue.current_evidence_strength and friends, not the new carried-command fields. Restore them to the vocabulary bullet so the repair_command bullet ends at the never-synthesize rule. Reviewed as part of #3962. * fix(test): pass the changed-line flag in the gate repair-start test `cargo test -p ripr --lib` does not compile on main since 64f3b92. #3936 added `repair_route_leads_with_the_repair_start_when_carried`, which calls `push_repair_route(out, route)`. #3968, branched before #3936 landed, added a third `changed_line_anchored: bool` parameter. Each PR was green on its own base; the combined tree fails with E0061 at output/gate/presentation.rs:630 and :642. The test now passes `true`. The start-repair line it pins does not depend on the flag. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK (cherry picked from commit 9884f9b) * test(fixtures): regenerate the packet-index Markdown goldens for the single Start here block #4011 made dogfood_report_packet_index_scenarios_have_checked_receipts render the corpus instead of comparing two goldens, and #3973 removed the second "Start here:" block from the rendered index. Each merged green against a main without the other, so main now fails that required xtask test on its first case. Regenerated all seven cases with the corpus canonical_command. Six index.md files lose the duplicate block; every index.json is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK (cherry picked from commit 3a0d679) * test(fixtures): rebless two check goldens blessed before the no-default-base change #4002 made CheckInput::default().base None and reblessed every --diff fixture on its base. #3944 (python_src_layout_package_import) and #3985 (tail_comparison_boundary) were blessed on bases without #4002, so each merged with "base": "origin/main" and base_revision "origin/main", and `cargo xtask goldens check` on main reports both as drift. Reblessed with a RIPR-SPEC-0084 reason; only base/base_revision change, the same delta #4002 applied to the other fixtures. goldens check: 0 drift entries. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK (cherry picked from commit 7930fef) --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Steven Zimmerman, CPA <15812269+EffortlessSteven@users.noreply.github.com>
…gap (#4019) * feat(output): carry the agent repair start on repair cards and gate routes Where a review card, gate repair route, or inline PR comment already names a seam that passes the repair-packet flip, lead with `ripr agent repair --root . --seam-id <id> --phase before` instead of the snapshot verify command. The command is computed once in evidence_record::canonical_repair_command_for, gated on repair_packet_eligibility(entry).eligible(), and carried (never derived) by review_comments, the gate repair route, and the inline comment publisher. Non-actionable routes and gap-record routes emit nothing and keep the existing verify guidance. Refs #3906 (outcome 3, gate and repair-card surfaces). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * test(output): rebind fixtures to the carried repair start and bind the flip The repo-exposure evidence record, the dogfood gate-adoption receipts, and the gate-decision verification fixture now carry repair_command. The first-useful-action unchanged-after-attempt snapshots are regenerated through the corpus test's own normalizer, and the verify and receipt artifacts are rebound to the new snapshot bytes; their movement is unchanged. The evidence-record test now calls the builder with an actionable state directly, so removing the eligibility check fails it. Refs #3906. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * fix(output): withhold the repair start for inline-test seams and lead CI comments with it agent repair refuses an edit target outside a test surface, so a seam whose recommended test lives in an inline #[cfg(test)] module was offered a repair start it could not use. repair_start_command_for now also requires the recommended test file to be a test surface, and canonical_repair_command_for goes through it. The generated CI's compact inline comment headline read only the Verify line, so a card carrying "Start the repair:" still led with Verify. The jq now captures the repair start and leads with it when present. Refs #3906 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * feat(output): start first-pr and pr-summary from a carried review-card repair Generated CI builds the gap ledger from repo-exposure, whose records are all repo-scoped, so `ripr first-pr` always fell to no_action for Rust even when the review-comments file held a card that passed the repair-packet flip. The review-comments input was only checked for existence. first-pr: when the ledger yields no top gap, read the review-comments input and select the first actionable card in comments[] then summary_only[] that carries a non-empty llm_guidance.repair_command. The command is carried byte-for-byte; first-pr never builds `agent repair` from a seam, gap, or probe id. Every selected field comes from that same card (source_artifact is the review-comments path, repair.route is AgentRepairTransaction, verify and receipt are the card's), never mixed with a ledger record. The card is used only when the report is tool=ripr, status=advisory, and names this invocation's root, base, and head; otherwise it fails closed to no_action. The selection keeps state top_gap so the editor projection and pr-summary consume it unchanged. receipt_path and agent_packet_command are null for a card selection: the card is not a ledger gap and first-pr does not parse commands for paths. selected.repair_command is present only when carried, so ledger-selected packets are byte-identical to before. The repair start is not added to `commands`: the VS Code first-pr projection fails the whole packet closed (unsafeCommand) on any `commands` value outside its allowlist, and `ripr agent repair` is not on it. CLI and Markdown render a "Start repair" line before Verify. A no_action reason now says why no card supplied a start and, when the cards are missing or were rendered from the gap ledger, names the seam-level `ripr review-comments --root --base --head --out` route. pr-summary: carry start-here selected.repair_command into TopRepair (never read review comments directly, which could mis-pair a card with start-here's top gap), render a "start repair" line before verify in both Markdown surfaces, and make it the first local reproduction command when present. Docs: OUTPUT_SCHEMA start-here and pr-evidence-summary contracts, FIRST_PR_WORKFLOW, RIPR-SPEC-0075 field tables. Refs #3906 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * test(first-pr): cover the head-mismatch refusal for review-card repair starts The fail-closed test covered base, status, root, scope and a missing report but not a report generated for another head. Removing the head check from review_comments_currentness_problem now fails it. Refs #3906 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * fix(first-pr): stop on unusable review cards instead of reporting no gap Re-walk F60-10. On a fresh Rust checkout, following first-pr's own next commands (repo exposure, then gap ledger) ended in `State: no actionable gap` with no next command, while the PR had a repair-ready seam. The repo-exposure ledger holds only repo-scoped records, so first-pr's second source, the review cards, decides; with the cards missing, first-pr gave a no-action verdict on evidence it never read. Now a Rust root stops on the cards instead: - missing: `missing_artifact` for `PR repair cards`, next command the seam-level `ripr review-comments --root . --base <base> --head <head> --out target/ripr/review/comments.json`; - not a RIPR report, or no status/root/base/head: `malformed_artifact`; - status not advisory: `blocked_artifact`; - another root: `wrong_root`; another base or head: `stale_artifact`. Current cards with no repair start, and cards rendered from the gap ledger, still end in no-action with the reason naming the route. The `artifacts[]` entry for the cards on a Rust root now names the same seam-level command. It named the `--gap-ledger` form, whose cards cannot carry a repair start. Preview-language roots keep the gap-ledger form. Fresh-checkout re-walk on the pricing repo: repo exposure, gap ledger, review cards, then `top_gap` with `Start repair: ripr agent repair ... --phase before`. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK * fix(test): pass the changed-line flag in the gate repair-start test `cargo test -p ripr --lib` does not compile on main since 64f3b92. #3936 added `repair_route_leads_with_the_repair_start_when_carried`, which calls `push_repair_route(out, route)`. #3968, branched before #3936 landed, added a third `changed_line_anchored: bool` parameter. Each PR was green on its own base; the combined tree fails with E0061 at output/gate/presentation.rs:630 and :642. The test now passes `true`. The start-repair line it pins does not depend on the flag. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK (cherry picked from commit 9884f9b) * test(fixtures): regenerate the packet-index Markdown goldens for the single Start here block #4011 made dogfood_report_packet_index_scenarios_have_checked_receipts render the corpus instead of comparing two goldens, and #3973 removed the second "Start here:" block from the rendered index. Each merged green against a main without the other, so main now fails that required xtask test on its first case. Regenerated all seven cases with the corpus canonical_command. Six index.md files lose the duplicate block; every index.json is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK (cherry picked from commit 3a0d679) * test(fixtures): rebless two check goldens blessed before the no-default-base change #4002 made CheckInput::default().base None and reblessed every --diff fixture on its base. #3944 (python_src_layout_package_import) and #3985 (tail_comparison_boundary) were blessed on bases without #4002, so each merged with "base": "origin/main" and base_revision "origin/main", and `cargo xtask goldens check` on main reports both as drift. Reblessed with a RIPR-SPEC-0084 reason; only base/base_revision change, the same delta #4002 applied to the other fixtures. goldens check: 0 drift entries. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK (cherry picked from commit 7930fef) * test(first-pr): cover the malformed review-card branches in the fail-closed loop Another tool's report, and reports that do not record their status, root or head, each stop first-pr as malformed_artifact with the seam-level regeneration command. Only the stale, blocked, wrong-root and missing cases were exercised before. Disabling the tool check fails the test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Steven · project thread
Before: a PR repair card, the gate's repair route, and the inline PR comment all name the seam id, but their next step is the snapshot choreography.
ripr agent verify --root . --before target/ripr/pilot/repo-exposure.json --after ….ripr agent verify".ripr explain …".None of them offers the repair transaction the docs now lead with.
After, on the boundary-gap fixture's exact-line card:
repair_command. Its Markdown leads with "Start repair", and its inline failure detail reads "start the repair withripr agent repair … --phase before".llm_guidance.repair_command.canonical_itemgainsrepair_command.…" when the card carries it.agent repairwould not accept, every one of these surfaces prints exactly what it printed before, and the field is absent ornull.How:
output::evidence_record::repair_start_command_foris the only place the command is built. It returns the command only when both of these hold:repair_packet_eligibility(entry).eligible(), the fail-closed flip (RIPR-SPEC-0087 §8);agent repairrequires of its edit target.canonical_repair_command_foradds thegap_state == "actionable"gate on top. Every other surface carries the string from the review card and never re-derives it:review_comments, the gate repair route (review_card_route_factsreads/llm_guidance/repair_command), the inline publisher, and the CI jq.Summary
agent repair#3906, outcome 3, for the review card, gate repair route, inline PR comment and generated CI comment. fix(pilot): close with the agent repair route when the top seam is eligible #3932 covers pilot and fix(agent): agent status resumes the repair attempt instead of the snapshot loop #3931 coversagent status.agent repair#3906 or ux(0.11): prove a blind installed shift-left agent journey before the swarm cut #3797. The editor (LSP) and the PR-review panel/first-action/evidence ledger are stacked on this branch in their own PRs.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Spec: RIPR-SPEC-0087 §8 (repair-packet eligibility);
docs/OUTPUT_SCHEMA.mdIssue: #3906 (partial). Parent: #3797
Scope Classification
Production delta: an additive
repair_commandon three JSON surfaces, plus the human text of the gate, the inline comment and the generated CI comment for seamsagent repairwould accept.Single acceptance criterion: wherever a review card, gate route or inline comment names a seam that
agent repairwould accept, its next step isripr agent repair --seam-id <id> --phase before. Wherever it would not, the output is unchanged.Non-goals:
verify_commandandreceipt_commandstay for existing consumers and for the lower-level loop;Decisions (overrule on review)
#[cfg(test)]module insrc/. It passed the flip, and the card offeredagent repair, which then refused with "is not a test surface". The builder now applies the sameis_test_surface_pathcheckagent repairapplies (60d0d95).actionability_foralready demotes a ready seam with a TypeScript observer beside its Rust test. Theeligible()call is kept as the authority, so the command fails closed if the two drift.ripr checkfindings, which carry probe ids rather than seam ids, or from presentation-text items. Neither can name a seam foragent repair, sorepair_commandisnullthere.explainstays in the JSON and the Markdown.--attemptcommand it cannot know yet.Support-tier Impact
Claim/proof notes:
gate-decision.schema.json(repair_route.repair_command, required, nullable) andreview-comments.schema.json(llm_guidance.repair_command, optional).docs/OUTPUT_SCHEMA.md.ripr init --ci) changes its compact comment headline.Policy Impact
Ledger or exception notes: reblessed goldens for the new field, with no other drift.
publishable-changed-linecase;unchanged-after-attemptsnapshots. This one needed its verify and receipt hashes rebound to the new normalized snapshot bytes:content_sha256inagent-verify.json, and the artifact and verify-json sha256 inagent-receipt.json. Its movement (unchanged, weak→weak) is untouched.Proof
On the current head (fcf2e0f,
mainmerged; one conflict ingate/tests.rs, resolved to #3938's<cwd>/-anchored inspection path):Earlier, at 411dde4:
The one xtask failure is
reports::eval_sweep_refresh::python_eval_sweep_refresh::unreadable_subtree_marks_corpus_selection_incomplete. It chmods a directory to000, but this container runs as uid 0, which reads it anyway. This PR does not touch that module. Hosted CI runs unprivileged and is the evidence for it.New tests:
evidence_record::…::canonical_item_names_the_repair_start_only_past_the_repair_packet_flip: eligible seam →actionable+ command; Rust+TS seam →static_limitation+null.evidence_record::…::repair_start_requires_a_test_surface_edit_target: related tests moved intosrc/lib.rsare eligible but not a test surface → no command,canonical_item.repair_commandnull.review_comments::…::review_cards_offer_the_repair_start_only_past_the_repair_packet_flipgate::repair_route::…::review_card_repair_start_is_carried_not_derivedgate::presentation::…::repair_route_leads_with_the_repair_start_when_carriedpr_inline_comment_publish_plan::…::inline_comment_body_starts_the_repair_when_the_card_carries_itgate::tests::gate_inline_failure_detail_names_seam_location_and_next_commandnow asserts both branches.generated_review_workflowasserts the jq capturesStart the repair:and leads with it. The jq was also run by hand on the publishable-changed-line plan (headline "Start the repair:ripr agent repair --root . --seam-id 8f7fa8644fd12280 --phase before") and on a card without one (headline "Verify:cargo xtask fixtures boundary_gap").Negative controls on the builder:
None: the evidence-record test, the review-card test andreview_comments_pr_guidance_fixtures_pin_required_casesfail.repair_start_requires_a_test_surface_edit_targetfails.Not run: the Windows lane,
cargo test --workspace.Claim Boundary
May claim: the review card, gate route, inline comment and generated CI comment offer the repair transaction exactly when
agent repairwould accept the seam.Not yet:
Rollback
Revert this PR's commits. Every field is additive.
Spec-Test-Code Traceability
crates/ripr/src/output/evidence_record.rs::{repair_start_command_for, canonical_repair_command_for},output/review_comments.rs,output/gate/{model,repair_route,presentation}.rs,output/pr_inline_comment_publish_plan.rs,cli/commands/init.rsStatic Language Check
killed,survived,untested,proven, andadequate.CI Economics
n/a
Engineering Check
panic,unwrap,expect,todo, orunimplementedin production code.panic,unwrap,expect,todo, orunimplementedin tests.Gates
cargo fmt --checkcargo clippy -p ripr --all-targets -- -D warningscargo xtask check-fixture-contractscargo xtask precommit🤖 Generated with Claude Code
https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK