Repository navigation
fix(classify): propagate a returned tail comparison to its return value - #3985
Conversation
A changed comparison that is the whole tail expression of a `-> bool` owner (`items >= 10`) had no flow sink: predicate flow looked only for a return fact, branch, or field after the changed line, so the predicate probe fell to propagation_unknown. The parallel return_value probe, whose assertion-token confirmation cannot match a returned boolean, then won triage with "No strong discriminator was detected" and the broad-assertion next step, hiding the missing `items == 10` boundary. Predicate flow now recognizes the owner tail: a non-unit signature, a changed line that is exactly the comparison (no `;`, `if`, `let`, `return`, `match`, `while`), and only the closing brace after it. A predicate retargeted from a changed `let` initializer is excluded, so its RIPR-SPEC-0158 operand-value limitation is unchanged. Adds the tail_comparison_boundary fixture and records the rule in RIPR-SPEC-0001. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018QP9k41E538Xgytw8QCSfM
|
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 reviewer attention before upstream: findings remain.
Confirmed findings
- Parallel return_value probe on the bare returned comparison (probe:src_lib.rs:return_value:b8337f94 / 04f99ee4) still emits the generic
Replace broad assertions with exact equality...advice, even though the predicate probe is the correct gap. The PR explicitly defers dedup; carriers should be aware that on-> booltail owners two findings will report, only one is actionable.
Verification questions
- Confirm rule gates on body line text equality between masked-body line at probe line and trimmed probe.expression; if a user reformats with trailing comment or whitespace-only differences the tail will silently not match.
- Confirm mutation claim (disable tail call fails positive; remove retarget guard fails negative) is asserted in PR body but no cargo-mutants receipt — profile disables heavy witnesses. Author's local test claim is the only attestation. Non-blocking because behavioral tests + golden already substantiate the rule, but the mutation story is unverified here.
Refuted
- Tail-comparison sink rule is reached before nearest_return because predicate_as_owner_tail runs first in predicate_flow_sinks; masked-string check makes it conservative.
Parked follow-ups
- Offset 0 guard silently drops the sink if the changed line is the signature line; not exercised by any test, but could surprise if a probe maps to line 1.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
The tail-comparison sink compared the changed line, the probe expression, and the probe's after text as raw text, so a trailing `// note` on the returned comparison silently dropped the sink. All three are now compared after masking comments and strings; the sink text is the code alone. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018QP9k41E538Xgytw8QCSfM
|
This is my response to review 5290522343. The fix for one finding is in a82e352. Fixed: a trailing comment dropped the tail sink. The review's first verification question was correct. Mutation receipt for the PR body's claim, re-run locally on this head:
Unmutated, 33/33 flow tests pass. Kept as-is:
Generated by Claude Code |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- Helper duplication risk:
tail_ownermirrorsfunction(...)exceptreturns: Vec::new(). Sincereturnsis not consulted by predicate_as_owner_tail, a shared helper or inline construction would avoid drift ifreturnsever becomes part of the test.
Verification questions
- Confirm offset arithmetic
probe.location.line.checked_sub(function.start_line)assumes probe lines and function.start_line share a coordinate space. If FunctionSummary.start_line is the signature line (1-based) and probe lines are also 1-based within the same file, the nth(0) on the masked body after taking the signature line still skips the signature. Verify with an integration test where the owner signature is multi-line or the function lives in a module with leading attributes.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- Mutation receipt is asserted in the PR body but no cargo-mutants artifact; behavioral tests + golden are the only attestation.
…lt-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
…lt-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)
…lt-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)
…lt-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)
…lt-base change 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 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)
…lt-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)
Forward-only merge of main a4db66c (GREEN). Resolutions: - fixtures/python_*/expected/CHANGELOG.md (5 files): both appended Pending bless sections kept; PR RIPR-SPEC-0028 entry stays (3), main's later RIPR-SPEC-0084 entry (#4002) appended as (4), keeping headings unique per the accumulated-bless-log design (goldens check does not compare CHANGELOG.md bytes). - expected/check.json auto-merge verified: main's base/base_revision None change (#3952) combined with this PR's evidence additions; input_identity unchanged per fixture. - No product-code conflicts; main's flow.rs tail-comparison (#3985) is Rust-only and semantically consistent; main's related_tests.rs src-layout matching (#3944) only widens the strong-call set this PR's boundary rule consumes.
…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
Summary
Before:
fn ships_free(items: u32) -> bool { items >= 10 }changed from>. It is reached through a wrapper at 20 and 2 items, and the test usesassert_eq!. The start-here gap saidMissing discriminator: No strong discriminator was detectedandReplace broad assertions with exact equality…, which is wrong advice for a test that already uses exact equality.After: the gap says
Missing discriminator: items == 10andAdd boundary tests for below, equal, and above the changed threshold with exact assertions. The output is the same whether the test calls the owner directly or through a wrapper, in one crate or across crates.How: the cause was the tail-expression shape, not the crate boundary. A single-crate direct-call repro produced the same output. The changed comparison produces two probes. The predicate probe had no flow sink, because
predicate_flow_sinksinanalysis/classify/flow.rslooks only for a return fact, branch or field. So it fell topropagation_unknown 0.66, although it already held a strong oracle andmissing items == 10. The duplicate return_value probe then won triage with its generic text.The new
predicate_as_owner_tailtreats the changed predicate as the returned value only when all of these hold:->;;and does not start withif,let,return,matchorwhile;}follows.Predicates retargeted from a changed
letinitializer keep their RIPR-SPEC-0158 limitation.Found in the onboarding thread's new-user re-walk (F15-14).
Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Spec: RIPR-SPEC-0001, which gains the tail rule. RIPR-SPEC-0158 governs the excluded let-retarget case.
Issue: none filed. The re-walk evidence is F15-14.
Scope Classification
Single acceptance criterion:
Decisions (overrule on review)
binding_value_fail_closedandbinding_value_family_matrixbecame actionable boundary advice despitebinding_predicate_non_claim, which would be a wrong promotion. The rule now excludes let-retargeted predicates, and all existing goldens pass unchanged.Support-tier Impact
Policy Impact
propagation_unknowntoweakly_exposedwith a named discriminator.Proof
At 08a734f:
predicate_that_is_the_owner_tail_flows_to_the_returned_value.predicate_tail_sink_fails_closed_off_the_bare_returned_comparisoncovers a unit owner, a comparison continued by&&on the next line, a let-bound comparison and a retargeted-binding predicate.tail_comparison_boundary:ships_freenamesitems == 10.earns_gift, tested on its boundary, has its predicate probeexposed.ws:1 exposed, 1 weak, 7 unknownto1 exposed, 2 weak, 6 unknown.pricingandpricing-litfull output is byte-identical to main.Not established:
exposedit can still be the start-here gap. Fixing it needs probe dedup or a reveal change.git merge-treeis clean against each.Claim Boundary
May claim: a changed tail comparison now names its equality boundary instead of generic assertion advice. Must not claim: returned-bool probes are deduplicated.
Rollback
Revert the commit. The fixture and spec text revert with it.
Spec-Test-Code Traceability
analysis/classify/flow.rsfixtures/tail_comparison_boundary/Static Language Check
killed,survived,untested,proven, andadequate.CI Economics
n/a
Engineering Check
panic,unwrap,expect,todo, orunimplementedin production code or tests.🤖 Generated with Claude Code
https://claude.ai/code/session_018QP9k41E538Xgytw8QCSfM
Generated by Claude Code