Skip to content

fix(oracles): inline unwrap_err equality against a named variant is an exact error-variant oracle (#12266) - #12290

Merged
EffortlessSteven merged 6 commits into
mainfrom
claude/fix-12266-inline-unwrap-err
Nov 2, 2026
Merged

EffortlessSteven merged 6 commits into
mainfrom
claude/fix-12266-inline-unwrap-err

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Governing issue or accepted claim: #12266

Acceptance delta (one sentence): assert_eq!(f(..).unwrap_err(), MyError::Variant) (either operand order, also .expect_err("..")) classifies as ExactErrorVariant/Strong, as the bound-variable spelling already did, so a direct owner test that pins the seam's variant discriminates an error_variant seam.

Cause

unwrap_err_bound_variables + is_unwrap_err_bound_error_assertion upgrade only let e = f(..).unwrap_err(); assert_eq!(e, E::V). The inline spelling stays exact_value, and an ErrorVariant seam accepts only ExactErrorVariant/GuardedResultMatch. On rust-hex, src/lib.rs:226 (Err(FromHexError::OddLength)) was strongly_gripped only because test_display (pins Display, not from_hex) lent it credit. #12254 removes that credit and exposes this hole (#12263).

Change

  • patterns.rs: is_inline_unwrap_err_error_assertion (equality only, one operand is the unwrap_err()/expect_err(..) result, the other names a specific error; assert_ne!, opaque expected values, Ok reads and .unwrap_err().kind() are not upgraded).
  • Both extraction paths apply it next to the bound-variable upgrade: the line scan (scan.rs) and the rust-analyzer path (syntax/ra.rs).
  • RIPR-SPEC-0106 states the inline form; traceability and changelog fragments added.
  • Cache: full 1.135, sharded/compact 0.138, file facts 1.52 (oracle facts change); version-pinned snapshots, OUTPUT_SCHEMA, corpus currentness constants and the unchanged-after-attempt hash chain regenerated. fix(repair): a proximity test pinning another function cannot credit any seam kind (#12146) #12254 (also claiming 1.135 / 0.138) re-bumps if this lands first.

Proof observed (by the author, on the pre-precommit tree of head ae56ea8)

  • New unit tests: positive (both orders, expect_err, wrapped), negative controls, and a full/compact repo-seam test (own variant discriminates; other variant and opaque expected value do not).
  • cargo test -p ripr --lib: 17363 passed, 0 failed.
  • cargo xtask goldens check, fixtures, check-evidence-promotion-honesty, verdict-corpus check-all (4 corpora checked; typescript 0/373 false verdicts, the rest reported 0 false by the command's exit): exit 0. cargo xtask precommit: exit 0.
  • Pilot ranking against the pinned crates, release binary at 4ec3eda vs this change (debug): 38 picks each, zero per-pick differences.

Not established

🤖 Generated with Claude Code

https://claude.ai/code/session_01PResvVn1d7d3d4PYtRgdri

…d variant is an ExactErrorVariant oracle (#12266)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PResvVn1d7d3d4PYtRgdri
@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!

@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 32 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: d1414066-479a-4347-bb5a-8577a0703e4f
Commits

Reviewing files that changed from the base of the PR and between deab1fa and 61a7fb2.

Files selected for processing: 20
  • .ripr/traceability.d/12266-inline-unwrap-err-exact-error-variant.toml
  • changelog.d/12266-inline-unwrap-err-exact-error-variant.md
  • crates/ripr/src/analysis/extract/mod.rs
  • crates/ripr/src/analysis/extract/oracles/mod.rs
  • crates/ripr/src/analysis/extract/oracles/patterns.rs
  • crates/ripr/src/analysis/extract/oracles/scan.rs
  • crates/ripr/src/analysis/rust_index.rs
  • crates/ripr/src/analysis/seam_cache.rs
  • crates/ripr/src/analysis/syntax/ra.rs
  • crates/ripr/src/analysis/test_grip_evidence/tests.rs
  • crates/ripr/tests/cache_clear_safety.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/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

@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 2 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 ae56ea8

I read the diff, built this head, ran ripr check --mode fast --format json on a Rust subject with the control spellings, and recomputed the unchanged-after-attempt hash chain. I could not run the lib tests here; Ripr Rust Small Result had not run (Admit queued).

The two extraction paths agree. The same is_inline_unwrap_err_error_assertion(&text) is OR'd next to is_unwrap_err_bound_error_assertion in both the line scan (extract/oracles/scan.rs) and the rust-analyzer path (syntax/ra.rs::extract_parser_oracles), under the existing ExactValue|WholeObjectEquality and Strong precondition, and the helpers ends_with_unwrap_err/ends_with_expect_err are only widened to pub(super).

Behaviour on the built head (changed Err(E::Empty) → Err(E::Bad); the predicate finding's related tests):

  • assert_eq!(parse("", A).unwrap_err(), E::Empty) → exact_error_variant / strong; the reversed operand order → exact_error_variant / strong.
  • assert_ne!(.., E::Bad) → relational_check / weak (not upgraded).
  • let expected = E::Empty; assert_eq!(.., expected) (opaque expected) → exact_value / strong (not upgraded).
  • assert_eq!(format!("{:?}", ..unwrap_err()), "Empty") (not an unwrap_err() operand) → whole_object_equality / strong (not upgraded).
    These match the negative controls the PR lists; its unit controls also cover an unwrapped Ok read and .unwrap_err().kind().

One edge, not blocking. assert_eq!(parse("", A).unwrap_err(), parse("", B).unwrap_err()) (both operands error reads, the second containing a Mode::B path) is labelled exact_error_variant, because expression_pins_specific_error accepts any operand containing a Path::Variant token. Its strength stays weak on the built head, so it earns no strong credit, but the label is wrong for a comparison that names no variant. Cheap fix: when one operand is an error read, require the other not to end in .unwrap_err()/.expect_err(..). The bound-variable spelling has the same looseness.

Cache. Full 1.135, sharded and compact 0.138 and file facts 1.51 → 1.52 are consistent with the version asserts, OUTPUT_SCHEMA and both CURRENT_CORPUS_CACHE_SCHEMA_VERSION constants; the file-fact bump is the right one because the oracle fact changes. Hash chain recomputed with raw_json_placeholder_v1: before/after.repo-exposure.json hash to their stored f36590e9…, and agent-receipt.json and agent-verify.json carry matching hashes. The value is the same as on #12246 and #12254 (all three change only cache_schema_version to 1.135), so two of the three need to re-bump and re-chain to 1.136/0.139, with a delta review. One thing to confirm: fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-identical-inline-arms.json still says "cache_schema_version":"1.134" here; the previous bump PRs (#12211, #12157) updated it and #12246 does. I did not find a gate that compares it, so it may be harmless, but the last two bumps kept it in step.

Spec and proof as stated: RIPR-SPEC-0106 states the inline form, with traceability and a changelog fragment. The author's reported proofs (17363 lib tests, goldens, verdict corpus, zero per-pick pilot ranking change) were not rerun by me. The PR correctly says the rust-hex seam only changes once #12254 lands too.

Before merge: Result green on ae56ea8; re-bump if #12246 or #12254 merges first.


Generated by Claude Code

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Triage at ae56ea8: required gate Ripr Rust Small Result is RED, completed-failure in run 41359792946. Same-head fellow failures: Rust tests shard 1 of 4, Rust test shards verify, Rust-only feature lane, ranking. Next: owner repair, start from the shard-1 log, then re-run.

…variant pin; sync file-fact cache pins and the honesty report (#12266)

- map_err replaces the error, so the inline pin refuses it (Devin finding)
- grouped (parenthesised) error read is accepted; two error reads pin no variant
- cache_clear_safety and OUTPUT_SCHEMA example follow file-fact 1.52
- identical-inline-arms honesty report recaptured at 1.135
- seam-level full/compact negative for the mapped error

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

Copy link
Copy Markdown
Member Author

Delta since ae56ea8, new head 7c0f960 (merge-ready re-applied):

Needs a delta review on 7c0f960.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Independent delta source review of 7c0f960: the original method-chain mapped-error finding and grouped-positive issue are addressed, but the same false-credit family remains via standard UFCS spelling:

assert_eq!(Result::map_err(parse("1"), |_| Fault::Odd).unwrap_err(), Fault::Odd);

Changing parse from Err(Odd) to Err(Bad) leaves that assertion passing. patterns.rs:204,216–220 rejects only dot-prefixed map_err; scan.rs:2812–2840,2910–2934 accepts Result::map_err(...) as the first plain-path call without checking its arguments. The ErrorVariant consumer at test_grip_evidence.rs:4205,4249–4281 does not supply an exact-error-value preservation check.

REPAIR_REQUIRED for this remaining spelling. Please extend the existing extraction/full–compact mapped-error negative control and repair the same owner path, retaining direct, reversed, expect_err and grouped positives. This is source reasoning, not independently executed mutation evidence. The cache/example corrections were inspected separately; dirty-tree fixture provenance is not exact-head runtime proof. Existing qualification 41368150651 remains owned and should not be duplicated.

… as an inline variant pin (#12266)

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

Copy link
Copy Markdown
Member Author

Head 5a38a74 (merge-ready re-applied): repairs the UFCS Result::map_err / Result::/Option:: adapter spelling from the delta review; inline_unwrap_err extraction + seam full/compact set passes 3/3 locally.

The Rust-only feature lane failure on 7c0f960 (cli_progress::catalog_commands_with_narration_paths_stay_quiet_under_ripr_quiet: unclassified catalog command reports kani) is not this PR's: it is a main-side combined-tree break between #12288 (new RIPR_QUIET catalog guard) and #12198 (adds reports kani). The fix is one line (reports kani into NO_NARRATION: it prints its Wrote lines on stdout, and the guard counts stderr only); I'm putting it up as its own PR and will merge main here after it lands rather than carry it in this diff.


Generated by Claude Code

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

merge-ready was requested, but this PR conflicts with main (head 5a38a74a), so GitHub creates no test-merge ref and no qualification run can start. Merge main into the branch and resolve the conflicts, then remove and re-apply merge-ready.

Copy link
Copy Markdown
Member Author

Affected-source review of 5a38a74a69b419b1accd2bc25bba804599fd5846: ordinary Result::map_err(...) UFCS is now covered by the adapter guard and extraction plus full/compact controls, resolving the spelling in the prior review in source. One member of the same family remains: Result::map_err::<_, _>(parse("1"), |_| Fault::Odd).unwrap_err() can replace the owner's error but the identifier check requires ( immediately after map_err; the :: split also sees map_err rather than Result as the penultimate segment. The existing call-path reader admits turbofish. Please normalize generic callee syntax consistently and extend the existing extraction and full/compact negative while retaining direct positives. This is source reasoning, not an executed mutation. The existing writer's separate reports kani repair and the current merge conflict must be reconciled before fresh qualification; no duplicate run is requested.

@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 5a38a74

Delta review since my review of ae56ea8 (two pushes: 7c0f960, 5a38a74). Unaffected dimensions (both extraction paths, cache constants, hash chain, schema pins) are carried from that review; I did not redo them.

What I ran. Built the lib tests at 7c0f960 and at 5a38a74 (debug info off) and ran inline_unwrap_err and spec_0106: 24 passed at each head. Then mutated the production code and reran at each head:

  • at 7c0f960: dropping the map_err refusal fails inline_unwrap_err_requires_an_equality_with_a_specific_error and the seam test; dropping the two-reads refusal fails the negatives test; disabling the grouping loop fails the grouped positive and the seam test.
  • at 5a38a74: disabling the Result::/Option:: owner refusal fails the negatives test (the new UFCS and/map_err rows). The identifier-boundary change in has_error_replacing_adapter is not pinned: replacing it with "always true" leaves all 24 passing (the guard against matching inside a longer name like try_map_err(). Cosmetic, not blocking.

Finding, non-blocking (recall, fail-closed). The new owner refusal also rejects the UFCS spelling of the thing being pinned. I added assert_eq!(Result::expect_err(parse("x"), "must fail"), ParseError::Empty) and the std-path variant to the positive list at 5a38a74: the positive test fails. Result::expect_err(call, msg) is a read receiver_keeps_call_error and ends_with_expect_err both support, and by reading is_error_read at 7c0f960 it was accepted there (I did not run that head with this row), so this push drops it. The direction is a missed credit (gap stays), not a false pin, and the spelling is rare. Either narrow the refusal to adapter names (and, or, ok_or, ..) or add that spelling as a deliberate negative so it reads as intended.

Other. Honesty-report recapture at 1.135 carries a -dirty analyzer_version and a local root path (/tmp/claude-0/ia); the other report in that folder has the same shape and nothing I found compares those fields, so I did not treat it as a defect. Main is still at cache 1.134, so the 1.135/0.138 collision with #12246/#12254 remains: whichever lands second re-bumps and re-chains.

Not run. Ripr Rust Small Result on this head (checks were queued when I looked); precommit; goldens.


Generated by Claude Code

…ize turbofish map_err

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

Copy link
Copy Markdown
Member Author

Head 77348b5 needs a delta review. Three changes since the reviewed 5a38a74:

  1. Merged main (Do not confirm a match arm whose match value is consumed before the owner returns it #12276 took cache 1.135). Re-bumped to full 1.136, sharded and compact 0.138, file facts 1.52. Re-chained the unchanged-after-attempt hashes and recaptured the identical-inline-arms honesty report.
  2. Addressed the turbofish finding on 5a38a74. has_error_replacing_adapter now strips balanced ::<...> first, so Result::map_err::<_, _>(..), Result::<A, B>::map_err(..) and .map_err::<E, _>(..) are refused. New negative rows are in the extraction test and the full/compact seam test.
  3. Result::expect_err UFCS recall loss is filed as Inline unwrap_err pin: UFCS Result::expect_err(call, msg) is refused as an error-replacing adapter #12336 and not changed here.

Ran locally: inline_unwrap_err and spec_0106 lib tests, 24 passed. Not run locally: honesty gate, goldens, precommit (the lib-test compile OOMs on this host). The hosted Result is the evidence for those. merge-ready re-applied.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Affected-source review of 77348b5a56a20b3d67272ac52e3d3c95051fd2af: balanced generic normalization and extraction/full–compact controls resolve the map_err::<_, _> spelling in my prior finding. One related grouped receiver remains: assert_eq!((Result::or(parse("1"), Err(Fault::Odd))).unwrap_err(), Fault::Odd) still passes if parse changes Odd to Bad. The adapter scan takes text before the first (, which is empty for this grouped receiver, while the receiver reader traverses grouping. Please align adapter inspection with that recursive traversal and add a grouped replacing-adapter negative alongside grouped direct positives. This is source reasoning, not executed mutation proof. The source cache generations are coherent at full 1.136, shard/compact 0.138 and file facts 1.52; hashes and current qualification remain separate.

@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 reviewer attention before upstream: findings remain.

Confirmed findings

  • expect_err is classified as an exact error-variant oracle even though it panics if the owner returns Ok; the assertion may therefore pass by panic rather than by observing the named error.

Verification questions

  • Confirm full and compact seam routes agree on direct, reversed, grouped, and expect_err positives while rejecting mapped, turbofish, different-variant, and opaque expected forms.
  • Confirm the implementation does not require the unwrapped result to be an error; direct owner tests can be classified as exact error pins even when the owner can return Ok.
  • Confirm the new seam test exercises positive and negative classifications but does not test an owner returning Ok, so the panic/Ok behavior remains unspecified.

Refuted

  • The modified code path handles source text and oracle classification rather than raw memory, secret material, network input, or executable payloads.

Parked follow-ups

  • Result::expect_err UFCS recall loss is a known sibling path explicitly filed as #12336 and is not reopened by this diff.

Evidence gaps

  • Hosted cargo-test evidence is still absent, so runtime execution of the new seam test is not established by this packet.
  • Model proof intent was rejected by deterministic validation.
  • No current-head executable receipt proves the changed tests fail against the pre-change implementation.
  • Absent ripr and cargo-test receipts leave the behavioral claims without this lane's independent executable witness.

Copy link
Copy Markdown
Member Author

Head be37e32 (on top of 77348b5) addresses the grouped-receiver finding. Delta review needed for this head.

  • has_error_replacing_adapter now skips leading groups before reading the callee path, so (Result::or(call, Err(..))).unwrap_err() and ((Result::map_err(..))).unwrap_err() are refused alongside the existing ungrouped forms. Negative rows added to the extraction test (grouped Result::or, grouped Result::map_err, grouped .map_err) and the seam test (grouped Result::map_err).
  • The grouped Result::or(call, Err(V)) row is not in the seam test. It returns Yes there, grouped and ungrouped, even though the inline pin refuses the text. Another credit route is classifying the assertion, so I filed ErrorVariant seam credited Yes for assert_eq!(Result::or(call, Err(V)).unwrap_err(), V) through a path other than the inline unwrap_err pin #12359 and left the row out. The extraction-level refusal for it is tested.
  • On the bot's expect_err note: an Ok owner makes expect_err panic, which fails the test, so it does observe the owner (same as the existing bound-variable upgrade). Not a false pin.

Ran locally: inline_unwrap_err and spec_0106 lib tests, 24 passed. The Rust-only lane failure on 77348b5 is only cli_progress (reports kani), fixed in #12325.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Independent affected-source disposition on be37e3253a5536b90e30c1a04f6b08c2afde6205: the inline-reader repair now follows grouped receivers and has extraction negatives for grouped replacing adapters, while direct grouped positives and mapped-error full/compact controls remain. No material finding in that bounded inline delta; I did not execute the owner-reported tests.

The full-seam Result::or(..., Err(...)) false-credit case is not fixed. In base 8d89aa930e368860dc33436612541b5cbb0e13f5, the earlier generic assert_eq!/Err( classifier already promotes it to ExactErrorVariant before the inline guard is consulted. That pre-existing route is tracked in #12359 with its direct-positive and full/compact negative obligations. Deferring it is a scope disposition for this PR, not acceptance of the overall error-value provenance claim. Exact-head required Result is still outstanding; predecessor results do not qualify this head.

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

Copy link
Copy Markdown
Member Author

Head 61a7fb2 is be37e32 plus a clean merge of main (#12325, the reports kani guard fix, and two changelog/test-only PRs). No source in this PR changed, and the cache values are still free on main (1.136 / 0.138 / 1.52). merge-ready is applied for the exact-head Result. The inline-delta disposition on be37e32 carries; the merge touched no reviewed dimension.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Independent integration-source disposition on 61a7fb2bef1bdb4e33853f6c58f7dc9abb5a66d9: the reviewed inline extractor, seam controls, spec and cache changes remain unchanged from be37e325; the intervening main integration adds the warm-ab control, LSP test cleanup and reports-kani catalog repair, with no material interaction found in the scoped review. Base cache generations 1.135 / 0.137 / 1.51 and candidate 1.136 / 0.138 / 1.52 remain consistent in source. No tests were independently executed in this review. #12359 remains the separately disclosed pre-existing full-seam false-credit issue. Run 41376006919 passed admission and is running; its exact-head required Result remains outstanding.

@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.

Parked follow-ups

  • The PR's claim that all replacing-adapter spellings are refused is not fully proven at the full/compact seam layer: grouped Result::or is extraction-negative but omitted from the seam test, and the seeded thread says that seam route still returns Yes.
  • UFCS Result::expect_err recall loss is outside this diff and explicitly parked in the seeded thread as #12336.
  • Pre-existing full-seam Result::or(..., Err(...)) false-credit remains tracked separately in #12359.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.
  • The exact-head cargo-test receipt is absent while the ripr sensor failed, so runtime completion cannot be inferred from scheduling or author-reported results.
  • Exact-head cargo-test evidence is not present in the packet, so the changed extraction and full/compact controls are not independently witnessed by this lane.
  • Exact-head runtime proof is incomplete because cargo-test is receipt-absent and the ripr sensor failed.

@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 61a7fb2

Delta review since 5a38a74. Three pushes: 77348b5 (main merge, cache 1.136 / 0.138 / file facts 1.52, turbofish map_err), be37e32 (grouped receivers), 61a7fb2 (main merge only: #12221, #12244, #12325; git diff be37e3253..61a7fb2b touches no extraction or syntax code). The code I ran is be37e32's, which is byte-identical to this head in every file this PR owns.

Run. Lib tests built at 77348b5 and be37e32 (debug info off): inline_unwrap_err, spec_0106, schema-version and cache filters pass, including the turbofish and grouped rows. The only failure in that set is fallible_literal_full_and_compact_warm_caches_invalidate_changed_inputs, which stops on its own message ("environment gap ... prepare canonical fixture dependencies"): offline fixture deps on this host, not this PR.
Mutations, each failing the intended test:

  • strip_turbofish replaced by identity: inline_unwrap_err_requires_an_equality_with_a_specific_error and the seam test fail.
  • leading-group trim in has_error_replacing_adapter removed: the negatives test fails on the new grouped UFCS rows.
  • (earlier heads) map_err refusal, two-reads refusal, grouping loop, Result::/Option:: owner refusal: each fails its test.

Cache. Main is at full 1.135 / sharded and compact 0.137 / file facts 1.51; this PR moves them to 1.136 / 0.138 / 1.52 with the doc comments, the pinned-constant tests, CURRENT_CORPUS_CACHE_SCHEMA_VERSION, OUTPUT_SCHEMA and the file-fact blockers in cache_clear_safety.rs all agreeing. #12246 and #12368 also claim 1.136, so whichever merges after this re-bumps and re-chains.

#12359 (the Result::or(call, Err(V)).unwrap_err() credit): predates this PR, not blocking here. I added probes to the seam test and ran it with the inline pin switched off entirely (is_inline_unwrap_err_error_assertion returns false). Result::or(parse("1"), Err(Fault::Odd)), its grouped form and MyResult::or(..) all still read Yes; the plain parse("1").unwrap_err() drops from Yes to Weak. So the false credit comes from another route that is independent of the pin. The pin refuses the text (negatives test), which is what this PR owns. It is a real false credit (the asserted value is a literal), so #12359 should be fixed on its own; it must not be claimed fixed by this PR.

Carried from my earlier review: the non-blocking UFCS Result::expect_err(call, msg) recall loss (a missed credit, not a false pin).

Not run. Ripr Rust Small Result on this head (unstable/in flight when I looked), goldens, precommit, the honesty gate, and the hash chain recompute after the 1.136 re-chain; the owner could not run them locally either, so the hosted Result must cover them before merge.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit c067b54 into main Nov 2, 2026
65 of 67 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/fix-12266-inline-unwrap-err branch November 2, 2026 03:48
cursor Bot pushed a commit that referenced this pull request Nov 2, 2026
…n exact error-variant oracle (#12266) (#12290)

* fix(oracles): an inline unwrap_err/expect_err equality against a named variant is an ExactErrorVariant oracle (#12266)

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

* fix(oracles): refuse a mapped error and two error reads as an inline variant pin; sync file-fact cache pins and the honesty report (#12266)

- map_err replaces the error, so the inline pin refuses it (Devin finding)
- grouped (parenthesised) error read is accepted; two error reads pin no variant
- cache_clear_safety and OUTPUT_SCHEMA example follow file-fact 1.52
- identical-inline-arms honesty report recaptured at 1.135
- seam-level full/compact negative for the mapped error

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

* fix(oracles): refuse UFCS map_err and Result::/Option:: adapter calls as an inline variant pin (#12266)

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

* Refuse grouped UFCS error-replacing adapters in the inline unwrap_err pin

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
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