Skip to content

Credit an exact pin of the variant a changed error arm removed - #12120

Merged
EffortlessSteven merged 9 commits into
mainfrom
claude/12110-removed-variant-credit
Nov 1, 2026
Merged

EffortlessSteven merged 9 commits into
mainfrom
claude/12110-removed-variant-credit

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Governing issue or accepted claim: #12110

Acceptance delta (one sentence): An error_path change that swaps one error variant for another on a tail-match arm is now credited when a test pins the removed variant through an owner call whose input selects that arm, and still is not credited for a pin reached through another arm or after a remapping of the match result.

What changed

  • error_path_arm_probe (arm_selection.rs) gives an error_path probe on a whole arm line a MatchArm view, with the removed expression restored as its old text. It requires the enclosing match to be the owner's tail expression, so a let r = match ..; r.map_err(..) owner gets no view (found by the independent review).
  • The existing ArmSelector (RIPR-SPEC-0229) is built for that view; reveal consults it only for the new removed_variant_selected per-assertion fact, which widens the ExactErrorVariant gate for error_path only. match_arm behavior and field_oracle_needs_admission are unchanged.
  • Payload-carrying changes still require the owner-return pin.
  • Spec RIPR-SPEC-0106 Part D; fixtures error_path_removed_variant_pinned_credited, ..._other_arm_not_credited, ..._remapped_not_credited; unit test for the arm view.

Why

Held #12056 (per-assertion "pins another function" refusal) removes a coincidental credit from corpus row old-unit-assert-matches-macro; this makes its real pin (Err(UnitError::Unknown) on parse_unit("q")) count. Repro on main with the coincidental TagError::Blank assertion deleted: error_path was weakly_exposed, now exposed. No known_false row, no relabel.

The independent review also found that match_arm (not error_path) already reads exposed on main for the remapped shape; that predates this PR and is filed as #12143. The remap fixture claims only the error_path finding.

Proof

  • cargo xtask precommit exit 0; goldens check: 0 drift; verdict corpus: 0 false verdicts (Rust 818, TypeScript 371, Python 361, Perl 94).

🤖 Generated with Claude Code

https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 25 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 149 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: fb55e930-f58d-4a33-bd48-0c0324e30403
Commits

Reviewing files that changed from the base of the PR and between 6c8a281 and 8c5f85c.

Files selected for processing: 46
  • .ripr/traceability.d/12110-removed-variant-pin-credit.toml
  • changelog.d/12110-removed-variant-pin-credit.md
  • crates/ripr/src/analysis/classifier/evidence.rs
  • crates/ripr/src/analysis/classify/arm_selection.rs
  • crates/ripr/src/analysis/classify/mod.rs
  • crates/ripr/src/analysis/classify/reveal.rs
  • crates/ripr/src/analysis/seam_cache.rs
  • crates/ripr/tests/lsp_lifecycle/gap_corpus_currentness.rs
  • docs/OUTPUT_SCHEMA.md
  • docs/specs/RIPR-SPEC-0106-error-seam-unwrap-err-variant-binding.md
  • fixtures/boundary_gap/expected/first-useful-action/unchanged-after-attempt/after.repo-exposure.json
  • fixtures/boundary_gap/expected/first-useful-action/unchanged-after-attempt/agent-receipt.json
  • fixtures/boundary_gap/expected/first-useful-action/unchanged-after-attempt/agent-verify.json
  • fixtures/boundary_gap/expected/first-useful-action/unchanged-after-attempt/before.repo-exposure.json
  • fixtures/error_path_removed_variant_diagnostic_not_credited/SPEC.md
  • fixtures/error_path_removed_variant_diagnostic_not_credited/diff.patch
  • fixtures/error_path_removed_variant_diagnostic_not_credited/expected/CHANGELOG.md
  • fixtures/error_path_removed_variant_diagnostic_not_credited/expected/check.json
  • fixtures/error_path_removed_variant_diagnostic_not_credited/input/Cargo.toml
  • fixtures/error_path_removed_variant_diagnostic_not_credited/input/src/lib.rs
  • fixtures/error_path_removed_variant_other_arm_not_credited/SPEC.md
  • fixtures/error_path_removed_variant_other_arm_not_credited/diff.patch
  • fixtures/error_path_removed_variant_other_arm_not_credited/expected/CHANGELOG.md
  • fixtures/error_path_removed_variant_other_arm_not_credited/expected/check.json
  • fixtures/error_path_removed_variant_other_arm_not_credited/input/Cargo.toml
  • fixtures/error_path_removed_variant_other_arm_not_credited/input/src/lib.rs
  • fixtures/error_path_removed_variant_pinned_credited/SPEC.md
  • fixtures/error_path_removed_variant_pinned_credited/diff.patch
  • fixtures/error_path_removed_variant_pinned_credited/expected/CHANGELOG.md
  • fixtures/error_path_removed_variant_pinned_credited/expected/check.json
  • fixtures/error_path_removed_variant_pinned_credited/input/Cargo.toml
  • fixtures/error_path_removed_variant_pinned_credited/input/src/lib.rs
  • fixtures/error_path_removed_variant_remapped_not_credited/SPEC.md
  • fixtures/error_path_removed_variant_remapped_not_credited/diff.patch
  • fixtures/error_path_removed_variant_remapped_not_credited/expected/CHANGELOG.md
  • fixtures/error_path_removed_variant_remapped_not_credited/expected/check.json
  • fixtures/error_path_removed_variant_remapped_not_credited/input/Cargo.toml
  • fixtures/error_path_removed_variant_remapped_not_credited/input/src/lib.rs
  • fixtures/error_path_removed_variant_shadowed_not_credited/SPEC.md
  • fixtures/error_path_removed_variant_shadowed_not_credited/diff.patch
  • fixtures/error_path_removed_variant_shadowed_not_credited/expected/CHANGELOG.md
  • fixtures/error_path_removed_variant_shadowed_not_credited/expected/check.json
  • fixtures/error_path_removed_variant_shadowed_not_credited/input/Cargo.toml
  • fixtures/error_path_removed_variant_shadowed_not_credited/input/src/lib.rs
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-identical-inline-arms.json
  • xtask/src/tests/rust_corpus_projection.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

gemini-code-assist[bot]

This comment was marked as resolved.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision

  • Needs verification checks before upstream.

Verification questions

  • Confirm the negative fixture's input selects the explicit "" arm, not the changed fallback arm, so it cannot prove that a sibling-arm pin is excluded.
  • Confirm positive and negative fixtures cover the key boundary: a removed-variant pin selecting the changed arm is credited, while the same pin through another arm is not.
  • Confirm error_path_arm_probe reconstructs an arm by substring replacement and only checks that the expression occurs once in one source line.

Parked follow-ups

  • No changed crypto, compression, runtime, or sibling helper entry points are present; changes are limited to classification logic, docs, and fixtures.

Evidence gaps

  • Late cargo-test evidence is still absent, leaving compilation and fixture behavior unconfirmed by this lane despite the PR body's claimed precommit and goldens checks.
  • Model proof intent was rejected by deterministic validation.
  • Fixture and unit-test receipts are not independently available because ripr failed and cargo-test is receipt-absent.
  • The supplied review packet lacks the scheduled cargo-test receipt, and the ripr sensor failed with exit code 2.
  • The packet has no completed late cargo-test receipt, so claimed test execution is not independently established in the supplied sensor evidence.
  • Fixture coverage checks both a changed-arm removed-variant pin and a same-variant pin through another arm, but independent execution evidence is absent because cargo-test is receipt-absent.
  • Executable validation is incomplete because cargo-test has no receipt and the ripr sensor failed.

Copy link
Copy Markdown
Member Author

Review of record, head 66a1120 (includes current main)

Angles: (1) false-credit hunt by an independent read-only reviewer over about 25 scratch subjects (wrong arm, earlier/later arm, another arm still returning the removed variant, assert_ne!, let result, helper, matches!, unwrap_err, guard arm, two arms on one line, payload variant, shadowed owner, method owner, and, after the fix, if/else tail, closure tail, Ok(match ..?), match ..?.map_err, block-bound result); (2) regression read of the selector wiring in evidence.rs/reveal.rs (MatchArm and non-arm ErrorPath unchanged); (3) docs, spec Part D, fixtures and traceability.

Findings and resolutions:

  • Blocker on the first head (2200708): a let r = match ..; r.map_err(..) owner got a false error_path credit. Fixed: the arm view requires the owner's tail match; unit test and fixture error_path_removed_variant_remapped_not_credited added. Reviewer re-ran all subjects on the fixed binary: no false error_path credit, positives (base, method) still credited.
  • Non-blocking, pre-existing: match_arm reads exposed for post-match remaps on main too (also for match ..{..}.map_err(..)); filed as rust: match_arm reads exposed when the match result is bound and remapped (map_err) before it is returned #12143 and not claimed here.
  • gemini nit (avoid allocating the removed name) applied; thread resolved.

Gates on the pre-merge-of-main tree: cargo xtask precommit exit 0, goldens check 0 drift, verdict corpus 0 false verdicts (Rust 818, TypeScript 371, Python 361, Perl 94). Hosted qualification on this head is still to run.

Disposition: nothing blocks.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 1, 2026 13:02
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

Devin Review

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REVIEW_READY — head 66a1120

Independent review of record on the exact head (includes current main, base 177c334).

Fix confirmed. error_path_arm_probe now requires enclosing_match(..).match_is_tail, so a let r = match ..; r.map_err(..) owner gets no arm view and no removed-variant credit. Pinned by a unit assertion (remapped owner → None) and the fixture error_path_removed_variant_remapped_not_credited.

Ran the head binary (built from this tree) on the three new fixtures

  • …_pinned_credited: error_path = exposed (credited), as expected.
  • …_other_arm_not_credited: error_path = reachable_unrevealed, match_arm = weakly_exposed; not credited.
  • …_remapped_not_credited: error_path = reachable_unrevealed; not credited. Its match_arm reads exposed, the pre-existing remap gap filed as #12143, not this PR's claim.
  • Each output's classes equal the committed expected/check.json.

Corpus, exact head, via xtask verdict-corpus: Rust 818 cases, false verdicts 0/818, contradictions 0/1006, operator-grid traps credited 0/46, oracle overclaim 0/49. The PR touches no corpus case, expected file or known-false row (0 files under verdict-corpus/known-false paths), so no relabel. I did not run TypeScript/Python/Perl corpora; this change is Rust error_path/match_arm only.

Read of the production path: the credit needs an exact error-variant assertion naming the removed variant, a selector that observes inputs and is not bound to the owner result, no import/cross-package shadow defeat, and an arm-selecting input or pattern pin; family == ErrorPath is the only entry. MatchArm and other ErrorPath behaviour is unchanged (field_oracle_needs_admission is now explicitly MatchArm-gated). Spec 0106 Part D, the changelog fragment and traceability match.

Not run: lib tests (workspace OOM on this host), goldens check; hosted Ripr Rust Small Result on this head is still required, and the seam-cache version must be bumped to the next free value before merge since classification output changes (it isn't bumped in this diff). No blocking findings.


Generated by Claude Code

…rs, clear the obsolete missing fact; bump cache schema (#12110)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AoapkiftDmzBaXiATmb2KP

Copy link
Copy Markdown
Member Author

Delta review of record — 9534ee8

Delta since the REVIEW_READY at 66a1120: merge of current main, CACHE_SCHEMA_VERSION 1.131 (main is 1.129, #12132 holds 1.130; mirrored in rust_corpus_projection.rs and OUTPUT_SCHEMA.md), and fixes for three Devin findings.

Angles: operand scoping, owner shadowing, stale-fact consistency.

Finding Resolution
Diagnostic text naming the variant credited the pin Lookup is scoped to the assertion's operands via assertion_oracle_text; fixture error_path_removed_variant_diagnostic_not_credited
Shadowed owner could confirm the pin !owner_shadowed in removed_variant_selected; fixture error_path_removed_variant_shadowed_not_credited
Obsolete ErrorVariant missing-discriminator fact left after credit Cleared when removed_variant_pin_credited; asserted empty in error_path_removed_variant_pinned_credited

Proof on this head: cargo xtask precommit green, goldens check clean, verdict corpus 0 false verdicts (Rust 0/818, TypeScript 0/371, Python 0/370, Perl 0/94). No blocking findings. All three threads replied to and resolved. Hosted exact-head Ripr Rust Small Result still required before merge.


Generated by Claude Code

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refuted

  • The changed implementation has no ArrayBuffer, TypedArray, resize, detach, transfer, or backing-store length-snapshot surface; the lane-specific UB class is inapplicable.

Parked follow-ups

  • The remapped-owner companion match_arm exposure is pre-existing and outside this PR's error_path claim; it should remain parked as #12143.

Evidence gaps

  • Exact-head compilation and fixture behavior lack an available independent receipt.
  • Model proof intent was rejected by deterministic validation.
  • Exact-head compile and fixture behavior remain unverified in this lane because the ripr sensor failed and the cargo-test receipt is absent.
  • The scheduled cargo-test evidence has no completed receipt, while the deterministic ripr sensor failed with exit code 2.
  • Late cargo-test execution evidence is still unavailable in the supplied packet, so fixture goldens and compilation are not independently confirmed by this lane.
  • The late cargo-test receipt is absent, leaving the central build and fixture witness unconfirmed despite deterministic source inspection.
  • Compilation and fixture execution are not independently evidenced in this lane because cargo-test has no receipt and ripr failed.
  • Independent executable verification is incomplete because ripr failed and cargo-test has no receipt.
  • The scheduled cargo-test receipt is absent, while the ripr sensor failed; independent compilation and fixture execution remain unverified in this packet.

Copy link
Copy Markdown
Member Author

Delta review of record — 8c5f85c (supersedes the 9534ee8 note on CI state)

The Rust-only feature lane failed on 9534ee8: the 1.131 cache bump had missed its pinned consumers. Delta: seam_cache.rs pin test (1.129 → 1.131 with a transition note), gap_corpus_currentness.rs constant, and the boundary_gap/first-useful-action/unchanged-after-attempt and evidence-promotion-honesty-corpus repo-exposure fixtures (version string, content sha256 and receipt/verify hashes recomputed from the files; no behavior change). Also merged current main (no conflicts; main still holds 1.129).

Local proof on this head: the previously failing cli_smoke first-useful-action, lsp_lifecycle gap-corpus and lib cache-pin tests pass, cargo xtask precommit exit 0, xtask corpus tests pass. No source change to the analysis since the reviewed 9534ee8. Hosted exact-head Ripr Rust Small Result is still required before merge.


Generated by Claude Code

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refuted

  • The changed code only classifies Rust error-path assertions and match-arm selections; it does not introduce or modify JS-backed memory or worker handoff behavior.

Parked follow-ups

  • A broad scan for crypto/compression/runtime sibling helpers was not warranted for this classifier-only change; no changed helper entry points or memory-sensitive operations are present.

Evidence gaps

  • Compilation and fixture behavior on the current exact head remain independently unverified in this lane because cargo-test has no completed receipt and the ripr sensor failed.
  • Exact-head compilation and the five new fixture expectations lack an available independent cargo-test receipt.
  • Model proof intent was rejected by deterministic validation.
  • Exact-head compilation and fixture execution are not independently evidenced in this packet.
  • Exact-head compilation and fixture execution are not independently evidenced because cargo-test has no completed receipt and ripr failed.
  • Exact-head compilation and fixture execution are not independently evidenced in the supplied packet.
  • The central build and fixture behavior lacks a completed independent receipt in this packet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants