Skip to content

fix(rust): assert_eq!(matches!(..), true) is only as strong as its pattern (#16290) - #16295

Merged
EffortlessSteven merged 5 commits into
mainfrom
claude/project-thread-six0md
Nov 26, 2026
Merged

EffortlessSteven merged 5 commits into
mainfrom
claude/project-thread-six0md

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • assert!(matches!(value, PATTERN)) already reads as strong as its pattern (RIPR-SPEC-0231 rule 3). The same check written as assert_eq!(matches!(value, PATTERN), true) (or assert_eq!(true, matches!(..))) skipped that reading and always read exact_value / strong. So assert_eq!(matches!(x, _), true), assert_eq!(matches!(Some(x), Some(_)), true) and assert_eq!(matches!(discount(100), 90 | 100), true) made a change read exposed even though they accept both versions (false credit). A positive-polarity comparison of a matches! operand now reads its pattern, so it gets the same class as the assert! form. A pattern that pins one value stays exact.

Swarm / Source Boundary

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge, dependency, or repo-ops development for ripr-swarm

Source-of-truth Links

Proposal: n/a
Spec: RIPR-SPEC-0231 (rule 3 amended)
ADR: n/a
Plan item: n/a
Governing issue or accepted claim: #16290
Acceptance delta (one sentence): assert_eq!(matches!(value, PATTERN), true) reads only as strong as PATTERN, the same as assert!(matches!(value, PATTERN)).

Candidate Relationships

Candidate branch (GitHub PR head is authoritative after publication): claude/project-thread-six0md
Stack parent or prerequisite PR (if any): none (#16288 merged)
Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): none
Accepted winner and losing candidate disposition (when decided): n/a

Scope

  • extract/oracles/pattern_admission.rs, asserted_pattern: when pattern_comparison_polarity reads the line as a positive comparison (assert_eq!(.., true), assert_ne!(.., false), either operand order) and one operand is a whole, un-negated matches!(..), the pattern reading of that call decides. A negative comparison (== false, assert_ne!(.., true)), a non-boolean operand (Ok(5)) or a variable (flag) gets no pattern reading, as before.
  • patterns.rs, transparent_operand: comments around the operand, grouping parentheses and a block holding only the operand are transparent, so assert_eq!((matches!(..)) /* note */, true) and assert_eq!({ matches!(..) }, true) read the same as the bare form. A block with a statement before its tail is not transparent. pattern_operand_negations uses it, so polarity sees the same operand.
  • Unit rows: weak, smoke and broad rows for the compared forms; no-reading rows for Ok(5), false, assert_ne!(.., true) and flag.
  • New end-to-end test crates/ripr/tests/matches_bool_equality_strength.rs through check_workspace. Controls: a single pinned value stays exposed in both operand orders; wildcard, side-only and several-value patterns read weakly_exposed.
  • Fixture wildcard_owner_discard: its unrelated assertion assert_eq!(matches!(Some(100), Some(_)), true) now reads smoke_only / smoke instead of exact_value / strong. The finding stays weakly_exposed; the next step and repair hint now name the weak assertion. Golden blessing reason (in fixtures/wildcard_owner_discard/expected/CHANGELOG.md): RIPR-SPEC-0231: assert_eq!(matches!(Some(100), Some(_)), true) is a side-only pattern, so the related-test oracle reads smoke_only instead of exact_value; the finding stays weakly_exposed (rust: assert_eq!(matches!(x, PATTERN), true) is an exact oracle whatever the pattern, even _ #16290). The matching RIPR-SPEC-0108 honesty case rust_wildcard_owner_discard now pins smoke_only / smoke with miss weak_assertion.
  • RIPR-SPEC-0231 rule 3 sentence for compared patterns. It also says that assert_ne!(matches!(..), false) stays weak under rule 1, because assert_ne! stays an inequality macro.
  • Honesty corpus case rust_repo_exposure_matches_compared_with_true_not_promoted (weakly_gripped, weak related-test oracle), with its subject, report and report_digest_required entry.
  • Cache 1.202 / 0.204 (main took 1.201 for fix(analysis): a file-module test's nested-block rename inside assert! no longer credits the owner (#16277) #16280), unchanged-attempt snapshots reblessed, honesty reports recaptured (envelope fields only), golden CHANGELOG entry, changelog.d entry, traceability entry.

Scope Classification

  • One production behavior

Production delta:

  • matches! compared with true reads its pattern instead of always reading exact.

Evidence/support delta:

  • New e2e test, unit rows, one fixture golden and its honesty case.

Single acceptance criterion:

  • assert_eq!(matches!(discount(100), 90 | 100), true) reads weakly_exposed; assert_eq!(matches!(discount(100), 90), true) stays exposed.

Non-goals:

  • No change to compound operands (ready && matches!(..)), which keep their existing rules.
  • No change to assert!(matches!(..)).

Support-tier Impact

  • none

Claim/proof notes:

  • Static reading only. This narrows credit, so it can only move findings from exposed towards weakly_exposed.

Policy Impact

  • none

Ledger or exception notes:

  • none

Proof

cargo test -j2 -p ripr --test matches_bool_equality_strength --test matches_or_pattern_strength --test cli_smoke
cargo clippy -j2 -p ripr --all-targets -- -D warnings
cargo fmt --check
cargo xtask goldens check
cargo xtask fixtures
cargo xtask check-evidence-promotion-honesty
cargo xtask check-policy-all

Result, failures, or skipped proof:

  • All commands above exit 0 on the branch rebuilt from main at 7878842.
  • Negative experiment: with main's pattern_admission.rs restored, the new test fails because the compared wildcard and or-pattern forms read exposed.
  • The ripr lib unit-test binary runs out of memory in this container, so the new unit rows run in hosted CI.

Claim Boundary

  • May claim that matches! compared with true follows its pattern. Must not claim any runtime mutation outcome.

Rollback

  • Revert the squash commit, which restores cache 1.201, the earlier reports and the earlier wildcard_owner_discard golden together.

Spec-Test-Code Traceability

  • Spec: RIPR-SPEC-0231
  • Tests: crates/ripr/tests/matches_bool_equality_strength.rs::a_matches_compared_with_true_is_only_as_strong_as_its_pattern
  • Code: crates/ripr/src/analysis/extract/oracles/pattern_admission.rs
  • Golden outputs: wildcard_owner_discard (oracle reading); boundary_gap unchanged-attempt snapshots (cache field only)
  • Metrics: none
  • ADR/learning: none

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.

CI Economics

n/a

Closes #16290

https://claude.ai/code/session_016EQRVmWcuwdH1oVxCdbzvV


Generated by Claude Code

…ttern (#16290)

An equality macro that compares a whole matches! with a boolean literal at
positive polarity (assert_eq!(matches!(..), true) in either order,
assert_ne!(matches!(..), false)) asserts the pattern, but the pattern
reading only saw assert!/assert_matches!, so the equality chain read it
exact_value / strong even for _ or Some(_). asserted_pattern now takes the
pattern operand when RIPR-SPEC-0231 rule 1's polarity reader says Positive;
every other comparison stays rule 1's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016EQRVmWcuwdH1oVxCdbzvV
…attern as smoke (#16290)

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

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary by CodeRabbit

  • Bug Fixes
    • Rust analysis now classifies matches! assertions according to how specifically their pattern constrains values. Broad patterns are treated as weaker checks, while patterns pinning a specific value remain strong.
    • Boolean equality assertions recognize supported wrappers and operand order, while non-positive comparisons remain weak.
  • Documentation
    • Clarified how pattern specificity affects assertion strength.

Walkthrough

The analyzer now derives oracle strength from the pattern in positive-polarity boolean equality assertions around matches!. The change adds classification tests, advances cache schema versions, and updates specification, documentation, and expected fixtures.

Changes

matches! Oracle Strength

Layer / File(s) Summary
Pattern admission and classification tests
crates/ripr/src/analysis/extract/oracles/*, crates/ripr/tests/matches_bool_equality_strength.rs, docs/specs/RIPR-SPEC-0231-rust-oracle-kind-admission.md, .ripr/traceability.d/*, changelog.d/*
The analyzer recognizes matches! compared with a boolean literal at positive polarity. Transparent wrappers include comments, parentheses, and single-expression blocks. Tests cover operand order, pinned and unpinned patterns, and cases that do not qualify.
Cache schema and snapshot updates
crates/ripr/src/analysis/seam_cache.rs, crates/ripr/tests/lsp_lifecycle/*, xtask/src/tests/rust_corpus_projection.rs, docs/OUTPUT_SCHEMA.md, fixtures/boundary_gap/expected/*, fixtures/evidence-promotion-honesty-corpus/reports/*
The full cache schema advances to 1.202, and the sharded and compact schemas advance to 0.204. Schema checks, documentation, and generated report metadata are updated.
Corpus fixtures and expected classifications
fixtures/evidence-promotion-honesty-corpus/{cases,repo-exposure-subjects/... ,reports/... ,corpus.json}, fixtures/wildcard_owner_discard/expected/*
The evidence-promotion corpus adds a comparison case and report. The wildcard-owner expected outputs classify the broad assertion as smoke-only and describe it as a weak assertion.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant class_with
  participant check_workspace
  participant asserted_pattern
  participant pattern_operand_negations
  class_with->>check_workspace: Analyze temporary workspace
  check_workspace->>asserted_pattern: Classify assertion pattern
  asserted_pattern->>pattern_operand_negations: Inspect transparent operand and negations
  pattern_operand_negations-->>asserted_pattern: Return pattern and polarity
  asserted_pattern-->>check_workspace: Return pattern-based classification
  check_workspace-->>class_with: Return exposure class
Loading
Merge Risk: Minimal · up to 02662

This change makes boolean-compared matches! assertions read according to their pattern, so broad patterns no longer count as exact evidence. The cache schema is advanced and the fixtures are updated to match. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main behavior change: a positive-polarity comparison of a matches! call with a boolean literal, in assert_eq!, now reads its pattern's strength. The PR body, linked issue #16290, a…
Linked Issues check Passed Issue #16290 requires that assert_eq!(matches!(x, PATTERN), true) follow its pattern in either operand order. The reviewed head adds pattern_comparison_polarity handling in pattern_admission.rs …
Out of Scope Changes check Passed The production change is limited to the matches!-compared-with-literal reading in pattern_admission.rs, the transparent-operand helper in patterns.rs, and the matching RIPR-SPEC-0231 rule 3 text…
Description check Passed The description fills the core template sections: Summary, Swarm / Source Boundary (ordinary feature box checked), Source-of-truth Links (spec RIPR-SPEC-0231 amended, issue #16290), Candidate Relation…
Full details: Title check

Explanation

The title names the main behavior change: a positive-polarity comparison of a matches! call with a boolean literal, in assert_eq!, now reads its pattern's strength. The PR body, linked issue #16290, and the changeset (pattern_admission.rs, patterns.rs, the new e2e test, and the wildcard_owner_discard fixture) all match this. The title is specific and concise, though it is 83 characters and slightly long for a conventional title.

Full details: Linked Issues check

Explanation

Issue #16290 requires that assert_eq!(matches!(x, PATTERN), true) follow its pattern in either operand order. The reviewed head adds pattern_comparison_polarity handling in pattern_admission.rs (asserted_pattern) and transparent-operand handling in patterns.rs (transparent_operand, pattern_operand_negations). The new test crates/ripr/tests/matches_bool_equality_strength.rs::a_matches_compared_with_true_is_only_as_strong_as_its_pattern runs check_workspace on the issue's discount(100) boundary case. It asserts: assert_eq!(matches!(.., _), true), assert_eq!(matches!(Some(..), Some(_)), true) and assert_eq!(matches!(.., 90 | 100), true) read WeaklyExposed (the true, matches!(..) order is covered too). The pinned control assert_eq!(matches!(.., 90), true) reads Exposed in both operand orders. The assert_eq!(matches!(.., 90), false) and assert_ne!(matches!(.., 90), false) controls read WeaklyExposed, which matches the issue's negated-pattern direction under rule 1. Compound operands and assert!(matches!(..)) are unchanged, as the PR states. Residual uncertainty: the issue names assert_ne!(matches!(..), true) as a negated-pattern case, and the test has no row for it. The PR states that case gets no pattern reading. The unit rows for the no-reading forms were not run locally (the PR reports they run in hosted CI).

Full details: Out of Scope Changes check

Explanation

The production change is limited to the matches!-compared-with-literal reading in pattern_admission.rs, the transparent-operand helper in patterns.rs, and the matching RIPR-SPEC-0231 rule 3 text. The new end-to-end test and unit rows cover that behavior. The cache schema bump (1.201 to 1.202, 0.203 to 0.204) and the regenerated honesty reports and boundary_gap snapshots follow from the change in oracle reading. The wildcard_owner_discard golden change follows from its assert_eq!(matches!(Some(100), Some(_)), true) row now reading as smoke. Its finding stays weakly_exposed, and the PR documents the blessing reason. The new honesty subject and case pin the same behavior. The bool_operands.rs visibility change to pub(super) supports the shared helper. No unrelated feature work appears in the summary.

Full details: Description check

Explanation

The description fills the core template sections: Summary, Swarm / Source Boundary (ordinary feature box checked), Source-of-truth Links (spec RIPR-SPEC-0231 amended, issue #16290), Candidate Relationships, Scope, Scope Classification (one production behavior, with production, evidence, acceptance criterion, and non-goals), Support-tier Impact, Policy Impact, Proof (commands listed with results and a negative experiment), Claim Boundary, Rollback, Spec-Test-Code Traceability, Static Language Check, and CI Economics (n/a). The author gives a clear, specific account of the behavior change, which matches the raw summary and objectives. Gaps: the Engineering Check and Gates checklists from the template are not ticked or addressed. The Support-tier and Policy Impact sections are marked 'none' with reasoning. The Proof section lists a subset of the template gates. The Engineering Check section asks about new panic/unwrap/expect use in production and test code. The description does not say whether those were checked. The Proof section also omits several gates from the template list, such as cargo doc, cargo package, and the xtask check-no-panic-family gate. Since the description is mostly complete and the missing items are non-critical checklist items, the check passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the pattern’s reach,
A broad match gets a softer score.
A pinned value keeps its strength,
New cache numbers mark the change.
Tests hop through both operand sides,
Then nibble greens beside the code.

Recent review info

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: 3c622d1f-5faa-4033-a57c-227333152422
Commits

Reviewing files that changed from the base of the PR and between 7878842 and 02662f4.

Files selected for processing: 63

  • .ripr/traceability.d/16290-matches-bool-equality-strength.toml
  • changelog.d/16290-matches-bool-equality-strength.md
  • crates/ripr/src/analysis/extract/oracles/bool_operands.rs
  • crates/ripr/src/analysis/extract/oracles/pattern_admission.rs
  • crates/ripr/src/analysis/extract/oracles/patterns.rs
  • crates/ripr/src/analysis/seam_cache.rs
  • crates/ripr/tests/lsp_lifecycle/gap_corpus_currentness.rs
  • crates/ripr/tests/matches_bool_equality_strength.rs
  • docs/OUTPUT_SCHEMA.md
  • docs/specs/RIPR-SPEC-0231-rust-oracle-kind-admission.md
  • fixtures/boundary_gap/expected/CHANGELOG.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/cases/rust_repo_exposure_matches_compared_with_true_not_promoted.json
  • fixtures/evidence-promotion-honesty-corpus/cases/rust_wildcard_owner_discard.json
  • fixtures/evidence-promotion-honesty-corpus/corpus.json
  • fixtures/evidence-promotion-honesty-corpus/repo-exposure-subjects/matches-compared-with-true/Cargo.toml
  • fixtures/evidence-promotion-honesty-corpus/repo-exposure-subjects/matches-compared-with-true/src/lib.rs
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-field-snapshot-missing-expected.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-field-snapshot-wrong-receiver.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-inherent-receiver-macro-discard.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-adapter-fed-error.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-branch-local-else-only.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-branch-local-rebound-let.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-field-snapshot-exact.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-field-snapshot-inline.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-field-snapshot-literal.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-field-snapshot-other.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-field-snapshot-settings.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-field-snapshot-weak.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-file-module-nested-block-renamed-other-function-outer-call-control.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-file-module-nested-block-renamed-other-function.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-guarded-boundary-guard-missing.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-integration-test-nested-block-renamed-other-function-sibling-mount-control.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-integration-test-nested-block-renamed-other-function.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-late-assert-eq-definition-match-arms.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-lib-test-false-skipped.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-local-closure-named-like-owner-map.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-macro-held-owner-call.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-macro-held-owner-result-local.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-manifest-rebound-assertion-root.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-matches-compared-with-true.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-matches-or-pattern-of-values.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-matches-or-pattern-single-value-control.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-nested-block-renamed-other-function-outer-call-control.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-nested-block-renamed-other-function.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-ok-assertion-failure-seam.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-panic-marker-collision.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-panic-marker-neutral.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-rebound-assert-eq-match-arms.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-renamed-other-function-qualified-control.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-renamed-other-function.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-test-local-rival-bare-use.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-test-local-rival-glob-use.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-unselected-match-arm.json
  • fixtures/evidence-promotion-honesty-corpus/reports/rust-repo-exposure-wrapper-fed-error.json
  • fixtures/wildcard_owner_discard/expected/CHANGELOG.md
  • fixtures/wildcard_owner_discard/expected/check.json
  • fixtures/wildcard_owner_discard/expected/human-full.txt
  • fixtures/wildcard_owner_discard/expected/human.txt
  • xtask/src/tests/rust_corpus_projection.rs

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 25, 2026 23:22
gemini-code-assist[bot]

This comment was marked as resolved.

@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

…s; honesty case (#16290)

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

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

SOURCE_REVIEW_READY - head 455d073

Source and oracle review of the exact head above.

Inspected:

  • pattern_admission.rs, asserted_pattern: when pattern_comparison_polarity reads the line as positive, the whole matches! operand gives its pattern pair, and pattern_assertion_classification grades it as it grades the assert! condition. A negative comparison, a non-literal operand and a compound operand get no pattern reading. assert_ne! stays capped by rule 1 whatever the literal.
  • patterns.rs, transparent_operand: it removes edge comments, grouping parentheses and a block holding only the operand, repeating until none is left. pattern_operand_negations uses it, so polarity and the pattern reader see the same operand. A block with a statement before its tail is refused by unwrap_block (now pub(super) in bool_operands.rs). The only callers are the polarity reader and asserted_pattern.
  • Unit rows: weak, smoke and broad rows for both operand orders, parenthesised literals, commented groups and blocks. No-reading rows for a pinned pattern, false, assert_ne!(.., true), a variable, a commented block compared with false and a block with a statement.
  • tests/matches_bool_equality_strength.rs through check_workspace: pinned values stay exposed in both orders and inside a commented block. Wildcard, side-only and several-value patterns, the wrapped spellings, the assert_ne!(.., false) pin and the == false comparison all read weakly_exposed. The pre-fix binary reads the compared and wrapped forms as exposed.
  • Fixture wildcard_owner_discard: the unrelated assert_eq!(matches!(Some(100), Some(_)), true) now reads smoke_only / smoke. The class stays weakly_exposed, the golden is reblessed with a RIPR-SPEC-0231 reason, and its RIPR-SPEC-0108 honesty case was updated to match.
  • New honesty case rust_repo_exposure_matches_compared_with_true_not_promoted reads weakly_gripped with a weak related-test oracle.
  • RIPR-SPEC-0231 rule 3 sentence, cache 1.201 / 0.203, reblessed unchanged-attempt snapshots (envelope only), recaptured honesty reports (hash fields only), golden CHANGELOG, changelog.d and traceability entries.
  • Local: clippy for the ripr package with all targets, rustfmt, goldens, fixtures, the honesty gate, the policy checks, cli_smoke and both matches end-to-end targets are clean. Lib unit tests cannot build in this container, so hosted qualification covers them.
  • Gemini's thread (no behaviour change, answered) and Devin's three threads (wrapped operands repaired, honesty case added, spec wording corrected) were answered and resolved.

Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

merge-ready is set, but this PR conflicts with main (head 455d073f), so GitHub creates no test-merge ref and no qualification run can start. 1. Merge main into the branch and resolve the conflicts. 2. Remove and re-apply merge-ready to request admission and qualification only. 3. After qualification is green, enqueue the PR through the native queue route; re-applying the label does not enqueue it.

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

SOURCE_REVIEW_READY - head 02662f4

Source and oracle review of the exact head above.

Inspected:

  • pattern_admission.rs, asserted_pattern: when pattern_comparison_polarity reads the line as positive, the whole matches! operand gives its pattern pair, and pattern_assertion_classification grades it as it grades the assert! condition. A negative comparison, a non-literal operand and a compound operand get no pattern reading. assert_ne! stays capped by rule 1 whatever the literal.
  • patterns.rs, transparent_operand: it removes edge comments, grouping parentheses and a block holding only the operand, repeating until none is left. pattern_operand_negations uses it, so polarity and the pattern reader see the same operand. A block with a statement before its tail is refused by unwrap_block (now pub(super) in bool_operands.rs). The only callers are the polarity reader and asserted_pattern.
  • Unit rows: weak, smoke and broad rows for both operand orders, parenthesised literals, commented groups and blocks. No-reading rows for a pinned pattern, false, assert_ne!(.., true), a variable, a commented block compared with false and a block with a statement.
  • tests/matches_bool_equality_strength.rs through check_workspace: pinned values stay exposed in both orders and inside a commented block. Wildcard, side-only and several-value patterns, the wrapped spellings, the assert_ne!(.., false) pin and the == false comparison all read weakly_exposed. The pre-fix binary reads the compared and wrapped forms as exposed.
  • Fixture wildcard_owner_discard: the unrelated assert_eq!(matches!(Some(100), Some(_)), true) now reads smoke_only / smoke. The class stays weakly_exposed, the golden is reblessed with a RIPR-SPEC-0231 reason, and its RIPR-SPEC-0108 honesty case was updated to match.
  • New honesty case rust_repo_exposure_matches_compared_with_true_not_promoted reads weakly_gripped with a weak related-test oracle.
  • Merge of main at 7878842 (#16280 took cache 1.201): conflicted generated files were taken from main, then the generation moved to 1.202 / 0.204. The unchanged-attempt snapshots were reblessed, all honesty reports were recaptured including the four #16280 reports, and the golden CHANGELOG entry now names 1.202. RIPR-SPEC-0231 rule 3 sentence, reblessed unchanged-attempt snapshots (envelope only), recaptured honesty reports (hash fields only), golden CHANGELOG, changelog.d and traceability entries.
  • Local: clippy for the ripr package with all targets, rustfmt, goldens, fixtures, the honesty gate, the policy checks, cli_smoke and both matches end-to-end targets are clean. Lib unit tests cannot build in this container, so hosted qualification covers them.
  • CodeRabbit reviewed this head with no actionable comments.
  • Gemini's thread (no behaviour change, answered) and Devin's three threads (wrapped operands repaired, honesty case added, spec wording corrected) were answered and resolved.

Generated by Claude Code

@EffortlessSteven
EffortlessSteven added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit 5233842 Nov 26, 2026
19 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/project-thread-six0md branch November 26, 2026 03:39
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.

rust: assert_eq!(matches!(x, PATTERN), true) is an exact oracle whatever the pattern, even _

2 participants