Skip to content

fix(oracles): an ensure! disjunction or nested == is never exact - #7681

Merged
EffortlessSteven merged 12 commits into
mainfrom
claude/project-thread-4g2cqz-ensure-disjunction
Oct 13, 2026
Merged

EffortlessSteven merged 12 commits into
mainfrom
claude/project-thread-4g2cqz-ensure-disjunction

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Before: classify_fallible_assertion read a whole ensure! condition as exact_value / strong as soon as one == or != appeared anywhere in it. So these all reported a strong exact oracle on the related test, although each only rejects some values:

  • ensure!(a != b || c == d)
  • ensure!(f(|x| x == 1))
  • ensure!(xs.iter().position(|x| *x == 1) != None)
  • ensure!(r == Err(E::A) || r == Err(E::B))

After: they read relational_check / weak (RIPR-SPEC-0231 rule 1). Exact credit needs a top-level == in some top-level && conjunct, and no top-level ||. A disjunction also never earns exact_error_variant. ensure!(a == b), ensure!(a == b, "msg"), ensure!(a != b && c == d) and ensure!((x == 4) && ready) stay exact.

How:

  • The classifier change is the new has_top_level_exact_equality in patterns.rs, which reuses the existing top-level &&/|| splitters. It replaces contains_exact_comparison, which is removed.
  • On the issue's assert! repro: assert! already read these forms weak on main. I checked that with a probe on main 24dd3d0, and the regression test keeps assert! controls.

Fixes #7558.

Swarm / Source Boundary

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

Source-of-truth Links

Regression case and moved rows

  • New corpus case spec0231-ensure-disjunction-not-exact. The test is ensure!(score(2) != 0 || score(3) == 6). Runtime truth: x * 3 survives, while x * 0 and x - 2 are killed. verdict-corpus relabel --case replays this clean on 1.95.0.
  • What the new case observes:
    • Without the fix, ripr reports the related test's oracle as exact_value / strong. I confirmed this by running ripr check --json on the case with the classifier change reverted.
    • The line verdict stays gap either way, because the owner pin is unconfirmed. So the case labels expected_oracle relational_check / weak, citing RIPR-SPEC-0231#13, which is the same ensure! inequality without the || arm.
    • Decision: the corpus validator only accepts numbered examples, and no SPEC-0231 example spells a disjunction. Example 13 is the closest governing one, so I cited it rather than amending the spec.
  • Oracle accuracy: 32/35 match, 0/35 overclaim (was 31/34, 0/34). [oracle] match_floor and the population_tests pin follow. No existing row moved.

Proof

  • Classifier: 203 oracle unit tests pass, including the new ensure_disjunctions_and_nested_equalities_are_never_exact and the extended exact_equality_ignores_string_contents_and_escapes.
  • Corpus: cargo xtask verdict-corpus check-all passes. Rust is 57/438 false; Python, TypeScript and Perl are unchanged.
  • Precommit: cargo xtask precommit passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EAoMKstQhYv56x2g6gEHZG


Generated by Claude Code

classify_fallible_assertion credited the whole ensure! condition as
exact_value / strong as soon as one == or != appeared anywhere in it, so
ensure!(a != b || c == d), ensure!(f(|x| x == 1)) and an inequality whose
operand holds a closure == all read strong. Exact credit now needs a
top-level == in some top-level && conjunct with no top-level ||, and a
disjunction never earns an exact error variant either (RIPR-SPEC-0231
rule 1). assert! already read these forms weak.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EAoMKstQhYv56x2g6gEHZG
New authored case spec0231-ensure-disjunction-not-exact: ensure!(score(2)
!= 0 || score(3) == 6) only rejects a zero score(2) (x * 3 survives). Its
expected oracle is relational_check / weak under RIPR-SPEC-0231 rule 1
(example 13 is the same ensure! inequality without the || arm). Without the
classifier fix ripr reported exact_value / strong, an overclaim. Oracle
accuracy moves to 32/35 match and 0/35 overclaim; the [oracle] floor and the
population pin follow.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EAoMKstQhYv56x2g6gEHZG
@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 Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 25afadd9-6fcf-400d-bf72-9a7db57f15ca
📥 Commits

Reviewing files that changed from the base of the PR and between 59ef8b3 and e593a95.

📒 Files selected for processing (5)
  • .ripr/traceability.toml
  • fixtures/currentness_matrix_python_deleted_statement/expected/CHANGELOG.md
  • fixtures/currentness_matrix_python_deleted_statement/expected/check.json
  • fixtures/currentness_matrix_python_deleted_statement/expected/human.txt
  • fixtures/rust-verdict-corpus/spec-coverage.toml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

Summary by CodeRabbit

  • Bug Fixes

    • Corrected classification of Rust assertion conditions containing disjunctions or nested equality checks. Deciding disjunctions are limited to weak relational checks rather than receiving overly strong exact-value, error, or observer classifications; qualifying top-level equality checks can still receive exact-value credit.
  • Documentation

    • Updated classification rules and examples for disjunctions and nested equality checks.
  • Tests

    • Added verdict-corpus coverage for ensure! disjunctions. The corpus now includes 35 cases, with 32 matches and no overclaims.

Walkthrough

The Rust oracle classifier now limits exact classifications when assertion conditions contain deciding disjunctions. RIPR-SPEC-0231 and tests define the rule. The verdict corpus adds an ensure! disjunction case and updates its accuracy totals.

Changes

Ensure Disjunction Classification

Layer / File(s) Summary
Disjunction and equality rules
docs/specs/RIPR-SPEC-0231-rust-oracle-kind-admission.md, crates/ripr/src/analysis/extract/oracles/patterns.rs, changelog.d/7558-ensure-disjunction-not-exact.md
RIPR-SPEC-0231 specifies when deciding disjunctions limit assertion strength and when a top-level equality can receive exact credit. Pattern helpers detect these conditions. Tests cover nested disjunctions and excluded forms.
Assertion classification
crates/ripr/src/analysis/extract/oracles/classify.rs, crates/ripr/src/analysis/extract/oracles/relational_tests.rs
The classifier withholds exact-value and exact-error classifications when a deciding disjunction is present. Tests cover assertion macros and extracted relational facts.
Corpus case and population
fixtures/rust-verdict-corpus/subjects/authored-ensure-disjunction/*, fixtures/rust-verdict-corpus/cases/spec0231-ensure-disjunction-not-exact.*, fixtures/rust-verdict-corpus/expected/rows/spec0231-ensure-disjunction-not-exact.json, fixtures/rust-verdict-corpus/spec-coverage.toml, xtask/src/reports/dx_scoreboard/population_tests.rs, .ripr/traceability.toml, changelog.d/verdict-corpus-oracle-accuracy.md, xtask/src/reports/verdict_corpus_oracle_tests.rs
The corpus adds an ensure! disjunction case and records its weak relational-check result. The match floor increases from 31 to 32, and population tests expect 35 cases.

Currentness Fixture Output

Layer / File(s) Summary
Expected report output
fixtures/currentness_matrix_python_deleted_statement/expected/*
The fixture’s expected report now includes the ripr.toml configuration path. Its changelog records the pending golden-output update.

Priority: ➖ Normal

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

Change: Bug fix · Severity of issue fixed: Medium

Possibly related PRs

Merge Risk: 🔵 Low · up to e593a

A narrow class of Rust assertions can receive the wrong oracle kind. This is a bounded analysis-quality issue, not a runtime failure.

### Architecture Summary

Architecture risk: 🔵 Low · up to e593a

The change affects 5 systems.

Changed systems: fixtures, crates, changelog.d, xtask, docs

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — fixtures (service) was modified; 10 changed files map to changed impact.
  • observed — crates (service) was modified; 3 changed files map to changed impact.
  • observed — changelog.d (service) was modified; 2 changed files map to changed impact.
  • observed — xtask (service) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in changelog.d/verdict-corpus-oracle-accuracy.md: The reported corpus totals change from 34 cases with 31 matches to 35 cases with 32 matches; the six RIPR-SPEC-0227 cases and three underclaims remain unchanged. The changelog adds that the ensure! disjunction overclaim was fixed by #7558.
  • observed — Modified behavior in fixtures/rust-verdict-corpus/cases/spec0231-ensure-disjunction-not-exact.diff: The fixture’s Rust patch changes score’s multiplication from x * 2 to 2 * x; no other code change is shown.
  • observed — Modified behavior in fixtures/rust-verdict-corpus/expected/rows/spec0231-ensure-disjunction-not-exact.json: Adds the expected-result record for spec0231-ensure-disjunction-not-exact, including its case metadata, gap verdicts, weak relational-check oracle, matching outcome, and finding and contradiction counts.
  • observed — Modified behavior in fixtures/rust-verdict-corpus/subjects/authored-ensure-disjunction.json: Adds the authored-ensure-disjunction subject metadata, including its authored version label, license, null shared corpus, and retained file paths with SHA-256 hashes.
Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Description check Warning The description explains the behavior change, scope, issue, acceptance delta, regression case, and proof. It omits several template sections, including candidate relationships, scope classification, s… Complete the omitted template sections, or explicitly mark irrelevant sections as none, n/a, or not applicable. Include the rollback plan, traceability mapping, engineering-check results, and gate results.
Passed Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 81.82% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 22 functions across 5 files. (5 skipped: 5 …
Title check Passed The title clearly and concisely describes the main change: preventing exact classification for ensure! disjunctions and nested equality expressions.
Linked Issues check Passed The pull request directly references issue #7558 and its stated objective matches the issue: prevent nested equality and disjunction arms from receiving strong exact-oracle classification.
Out of Scope Changes check Passed The production changes, specification updates, tests, corpus fixtures, and traceability updates support the oracle-classification fix. The additional currentness fixture updates are described as requi…
Full details: Description check

Explanation

The description explains the behavior change, scope, issue, acceptance delta, regression case, and proof. It omits several template sections, including candidate relationships, scope classification, support-tier impact, policy impact, claim boundary, rollback, traceability, engineering checks, and gates.

✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch claude/project-thread-4g2cqz-ensure-disjunction
🧪 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 each || with care,
And keeps exact credit out of there.
Top-level equals earn their place,
While weak relations set the pace.
New corpus rows join the test,
The rabbit hops away to rest.

Comment @coderabbitai help to get the list of available commands.

@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 pR body asserts '32/35 match, 0/35 overclaim' but the new case row only cites RIPR-SPEC-0231#13 and labels expected_oracle=relational_check/weak; chi-an exact spec example for a disjunction exists, so the citation is by analogy.
  • Confirm changelog bullets include 'f(|x| x == 1)' and 'xs.iter().position(|x| *x == 1) != None' but the typed-units test only exercises 'ensure!(...)' wrappers, never a free-standing expression hitting classify_fallible_assertion by those paths.

Refuted

  • A new top-level helper should have been a method on a shared Conjunct visitor to avoid two passes over the masked string.; refuted because: Branch only runs through split_top_level_conjuncts + has_top_level_disjunction when invoked; the conjunct visitor would add a type without removing a pass; cost outweighs a thin function.

Parked follow-ups

  • Case spec0231-ensure-disjunction-not-exact is hand-written and pinned to ripr_commit 8f5e72ea4; PR body cites 1.95.0 for the verdict-corpus relabel replay. The commit hash is the only cross-reference; mismatch risk is parked for follow-up.
  • PR body cites RIPR-SPEC-0231 example 13 instead of amending the spec; the corpus validator only accepts numbered spec examples, so a citation is the right bound, but it leaves the disjunction rule un-recorded as a numbered example.
  • changelog.d/7558-ensure-disjunction-not-exact.md groups three forms (disjunction, closure-==, call-arg-==) under one bullet, which is fine but the PR body and the test table distinguish closure-== from call-arg-==; reader confusion risk is low but document hygiene suggests a follow-up note.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

Extends #7558's cap from a top-level || to a || inside a parenthesized
group that is the whole condition or a top-level && conjunct, for
ensure!, assert! and the fallible path. A || inside a call argument or
closure still does not decide the condition. RIPR-SPEC-0231 rule 1 and
example 13 now state the disjunction forms; the old control that read a
grouped '|| false' as exact now reads weak.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EAoMKstQhYv56x2g6gEHZG
coderabbitai[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 one verification check before upstream.

Verification questions

  • Confirm stale-reference risk for removed contains_exact_comparison: a repo-wide grep proof is the cleanest way to confirm no orphan imports remain outside the two call sites shown in the diff; if any are found, the fix is no longer smallest-complete.

Parked follow-ups

  • Smallest-complete fix: removed contains_exact_comparison and routed both call sites through has_top_level_exact_equality; no parallel classifier change duplicated elsewhere.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

…s decide

Review of 153f168 found ensure!(c == d && (a || b)) read exact while the
matches! form read weak, against the spec text. Both now read like the
negated-pattern rule: the deciding group pins nothing and the remaining
conjuncts decide, never below relational_check / weak. A leading comment
no longer hides a parenthesized group, and a disjunction with a broad
error arm (ready || r.is_err()) reads relational_check, not broad_error.
RIPR-SPEC-0231 rule 1 now states which == pins, the conjunct rule and
prop_assert!; example 13 gains the pinning-sibling form. Traceability,
changelog and the corpus case's spec_examples follow.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EAoMKstQhYv56x2g6gEHZG

@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

  • spec0231-ensure-disjunction-not-exact cites RIPR-SPEC-0231#13 by analogy because no numbered example spells a disjunction; the new paragraph in the spec describes it but no numbered example was added. Recommend adding example 13a / 13b to the numbered examples block so the corpus citation stops being an analogy.
  • xtask/src/reports/dx_scoreboard/population_tests.rs:701 — Hard-coded pair (31,34)→(32,35) plus the expected_ids.len() guard (34→35) are the only test-side coupling to corpus size. A merge that adds/drops another labeled case would silently break the numerator/denominator without check-fail. Consider sourcing both numbers from fixtures/rust-verdict-corpus/spec-coverage.toml's match_floor and a counted labeled-case set so the dx-scoreboard pin can't lie. Pre-commit selector is source-only so it cannot catch this — material test-oracle weakness.
  • fixtures/rust-verdict-corpus/spec-coverage.toml:24 — match_floor rose from 31→32 while total labeled went 34→35, so the underclaim rate denominator changed independently. The new floor/ceiling pair encodes an implicit assumption that the new case matches and no row moved; neither is asserted by a focused test. Add a unit test that verifies labeled-row count == population denominator and expected_oracle.observed_kind for the case row.

Verification questions

  • Confirm patterns::spec_0106_tests renamed exact_comparison_ignores_string_contents_and_escapes to exact_equality_ignores_string_contents_and_escapes and added 9 #7558 cases. But the public test name is gone from the function; no leftover copy observed in this diff — rename is clean at the call-site (single function in that block).

Parked follow-ups

  • populated corpus row tracks match_floor 32/35 and population_tests denominator/numerator moved 34->35, 31->32 in lockstep; new authored subject (authored-ensure-disjunction) keeps case authored and pinned to ripr_commit 8f5e72e with sha256 retained files.
  • spec0231-ensure-disjunction-not-exact is partially_discriminated by runtime mutant kill: x3 passes (first arm holds), x0 and x-2 fail tests::score_is_nonzero_or_pinned. The case anchors lib.rs:2 and expected_oracle cites RIPR-SPEC-0231#13 by analogy since no numbered example spells a disjunction; authors flagged this as parked follow-up.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

Flooring the rest at relational_check / weak would lift a smoke reading
(assert!(opt.is_some() && (a == b || c))), and rule 1 never raises a
strength. An empty rest still reads relational_check / weak.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EAoMKstQhYv56x2g6gEHZG

@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 corpus case spec0231-ensure-disjunction-not-exact cites RIPR-SPEC-0231#13 by analogy; no numbered example spells a disjunction in the spec, so the citation is not a literal rule match.
  • Confirm population_tests.rs hard-codes (32,35) for oracle_accuracy and expected_ids.len() > 35 guard; any add/drop of a labeled case will silently break the numerator/denominator because the values are not sourced from spec-coverage.toml's match_floor or a counted labeled-case set.
  • Confirm spec-coverage.toml match_floor rose 31->32 while total labeled went 34->35; the underclaim-rate denominator changed independently, so the floor/ceiling pair no longer encodes the original underclaim count floor/ceiling pair it replaced; underclaim pin location is unclear.
  • Confirm dx-scoreboard pin is hard-coded to (32,35) plus a > 35 guard. A merge that adds/drops a labeled case breaks the numerator/denominator without check-fail; coupling to spec-coverage.toml/match_floor is missing.
  • Confirm spec example 13 was extended in prose to cover the disjunction form, but no new numbered example (e.g. 13a/13b) was added; corpus case cites RIPR-SPEC-0231#13 by analogy. The spec text and case both rest on the analogy. If the analogy is challenged, the case's expected_oracle is no longer machine-citation-grounded.
  • Confirm population_tests.rs hard-codes the (numerator=32, denominator=35) pair and the expected_ids.len() > 35 guard. A future corpus change that adds/drops a labeled case in a way that keeps the match floor at 32 can silently mismatch the hard-coded denominator without failing check-all, because the dx-scoreboard pin only asserts equality on (totals). Nudge is correct today, but the coupling is to a hand-counted count, not spec-coverage.toml's match_floor.
  • Confirm match_floor rose 31→32 while labeled total moved 34→35 independently. The underclaim-rate denominator is not encoded in spec-coverage.toml; a future case could shift the underclaim rate without check-all failing because overclaim_ceiling=0 only constrains overclaim, not underclaim floor/ceiling.
  • Confirm removed contains_exact_comparison could leave an orphan import elsewhere; the diff shows only the two classified call sites updated, but no repo-wide grep proof was provided in the seeded thread. Risk is low because the function is crate-internal and the import block in classify.rs is fully replaced.

Parked follow-ups

  • Corpus case spec0231-ensure-disjunction-not-exact cites RIPR-SPEC-0231#13 by analogy (the spec describes disjunction forms in prose but no numbered example spells one). Spec validator only accepts numbered examples, so citation is by proximity.
  • Prior reviewer concern still open: the new corpus case cites RIPR-SPEC-0231#13 by analogy because no numbered example spells a disjunction. The spec body gained a paragraph but no example number was added; corpus citation stays an analogy.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

Re-review of ae238ff found that a trailing // comment on a kept conjunct
swallowed the rest and the closing ); of the rewritten assertion, so the
bare matches! substring read exact/strong. Both conjunct-rest rewrites
(deciding disjunction and negated pattern) now put each conjunct and the
closing ); on their own lines. RIPR-SPEC-0231 rule 1 now says a deciding
group drops out before the negated- and compared-pattern caps. The
whole-object gate under a deciding || is restored, and the RELATION and
INEQUALITY doc comments are on the right constants.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EAoMKstQhYv56x2g6gEHZG
is_inequality_assertion no longer calls a condition an inequality when a
deciding || group drops out and a pinning sibling decides, matching
classify_assertion. RIPR-SPEC-0231's negated-pattern sentence now names
that exception itself.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EAoMKstQhYv56x2g6gEHZG
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 13, 2026 13:44
@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 2 potential issues.

Devin Review

@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

  • Corpus case spec0231-ensure-disjunction-not-exact cites RIPR-SPEC-0231#13 by analogy (no numbered disjunction example). Consider adding example 13a/13b so the corpus citation is a literal rule match rather than an analogy, and so future drift in #13 cannot silently invalidate the labeled expected_oracle.
  • Boundary placement is correct: the new helper sits in patterns.rs and is reused by both classifiers; the cap order is consistent; the rest-step masks and re-joins conjuncts so a trailing // cannot swallow the closing );. No parallel visitor was added.
  • docs/specs/RIPR-SPEC-0231-rust-oracle-kind-admission.md:491 — Adding example 13a/13b in the numbered block would let spec0231-ensure-disjunction-not-exact.json cite a real example instead of RIPR-SPEC-0231#13 by analogy; the new prose already describes the disjunction form.

Verification questions

  • Confirm dx-scoreboard oracle_accuracy pin (32,35) and >35 guard are hard-coded literals; spec-coverage.toml match_floor and a counted labeled-case set are not consulted, so an add/drop of a labeled case breaks numerator/denominator silently with no check-fail.
  • Confirm hard-coded (32,35) and expected_ids.len()>35 in population_tests.rs break silently on any merge changing the labeled-case count; the dx-scoreboard pin is the only consumer of the corpus numerator/denominator.
  • Confirm spec0231-ensure-disjunction-not-exact cites RIPR-SPEC-0231#13 by analogy; the spec's prose paragraph was extended but no numbered example (e.g. 13a/13b) was added for the disjunction form, leaving the corpus citation a rule-by-analogy pin.
  • Confirm match_floor rose 31->32 while total labeled went 34->35; the prior floor encoded the underclaim-rate denominator count separately, so the (floor, ceiling) tuple now encodes different semantics than before (success floor over count, not overclaim floor over underclaim count).

Parked follow-ups

  • Spec citation RIPR-SPEC-0231#13 is by analogy: no numbered example spells a disjunction; corpus validator only accepts numbered examples. Reviewer recommends 13a/13b numbered examples; spec prose extends example 13 in place.
  • Architecture parking (pre-existing): the population_tests.rs (32,35) pin plus the > 35 guard is hard-coded; match_floor=32 in spec-coverage.toml is the analogous floor. Neither is sourced from the other, so an add/drop of a labeled case breaks the dx-scoreboard pin without check-fail. Pre-commit is source-only and cannot catch this.
  • The new authored subject's lib.rs.txt omits the cargo test build/test command proof and the test fixture is hand-pinned to ripr_commit 8f5e72e; the PR body cites 1.95.0 for verdict-corpus relabel replay. Cross-reference drift between pinned commit and version string is parked in seeded thread; under the 'truth' block the test_command is 'cargo test' but no witness artifact is included.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

assert!(ready || events_sent.contains(&id)) passes without observing the
event, so step 9's mock_expectation credit now caps to relational_check /
weak under a deciding disjunction, as broad_error already does. Also bumps
the spec0231 case-count pin to 29 for the new corpus case.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EAoMKstQhYv56x2g6gEHZG
@EffortlessSteven
EffortlessSteven marked this pull request as draft October 13, 2026 15:20
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 13, 2026 15:20
@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!

…R-SPEC-0255

Main merged #7680's new fixture and #7577's config line in check output
without re-blessing the fixture against both, so goldens check is red on
main. Ported here so this PR's merge tree is green; no-op once main
carries the same bless.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EAoMKstQhYv56x2g6gEHZG
@EffortlessSteven
EffortlessSteven marked this pull request as draft October 13, 2026 17:09
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 13, 2026 17:09

Copy link
Copy Markdown
Member Author

The required Ripr Rust Small run on 59ef8b3 failed in cargo xtask goldens check, on the fixture currentness_matrix_python_deleted_statement. That failure is not this PR's. Main merged #7680, which added the fixture, and #7577, which adds the config: / config_path line to check output (RIPR-SPEC-0255). Neither re-blessed the fixture against the other, so goldens check is red on main itself.

e593a95 merges main and ports the re-bless (goldens bless … --reason "RIPR-SPEC-0255: …", three files under that fixture's expected/). Once main carries the same bless, this is a no-op. Locally on the merged tree, goldens check, precommit, the verdict-corpus check (57/440, oracle 32/35, 0 overclaim) and the xtask corpus tests (229) all pass.


Generated by Claude Code

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

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 13, 2026 17:43
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 13, 2026 17:43
@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!

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

Confirmed findings

  • Spec only extends example 13 in prose; adding numbered 13a/13b would let the corpus case cite a literal example instead of analogy.
  • Other adjacent oracle modules (smoke/custom/snapshot/predicate) in the same oracles directory could share the splitters or pattern-admission logic but were not walked; if any of them re-implement a top-level disjunction check, rule 1's new helper would be wasted and a sibling observer might still over-claim.
  • Corpus case spec0231-ensure-disjunction-not-exact cites RIPR-SPEC-0231#13 by analogy; no numbered example in the spec spells a disjunction. Spec prose (rule 1) now describes the disjunction form, but a future edit to example 13 could silently invalidate the labeled expected_oracle. Spec already extends example 13 with disjunction phrasing; adding numbered examples 13a/13b would convert the citation from analogy to literal. Author acknowledged in seeded review (2026-10-13T15:20).
  • Inequality cap order in is_inequality_assertion now also blocks deciding_disjunction_conjunct_rest, but only when contains_negated_pattern holds. Cases like ensure!(a == b \|\| c == d) (no !pattern) still rely on classify_non_negated_assertion's disjunction cap; the interaction is correct but undocumented in classify.rs header.

Verification questions

  • Confirm deciding_disjunction_conjunct_rest mirrors negated_pattern_conjunct_rest shape (mask comments, split top-level conjuncts, drop deciding group, re-emit macro call with \n && join) and is only invoked at classify_assertion entry plus the inequality-cap probe.

Refuted

  • A single conjunct-visitor type would remove the duplicated split_top_level_conjuncts/has_top_level_disjunction traversal between has_deciding_disjunction and has_top_level_exact_equality; refuted because: The two predicates traverse conjuncts once each, reuse the same existing splitter, and conjunct count is bounded by source line length; introducing a Conjunct visitor type adds an abstraction layer without reducing passes. Trade-off rejected as not worth a type.
  • A disjunction a \|\| b inside a call argument like f(a \|\| b) would be misread as a deciding top-level disjunction and wrongly cap the outer reading to relational_check weak.; refuted because: Refuted: has_deciding_disjunction only descends into parenthesized_contents of split_top_level_conjuncts; call args aren't conjuncts. relational_tests row assert!(matches!(pick(\|x\| x > 1 \|\| x < 0), Ok(3))) keeps ExactValue/Strong.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

Parked follow-ups

  • changelog.d/7558-ensure-disjunction-not-exact.md and the spec paragraph in RIPR-SPEC-0231 both enumerate the same disjunction/truth-table prose. The spec prose is normative, the changelog prose is user-facing; further edits risk drifting from each other unless one cites the other. Not blocking, but worth a follow-up note in #7558.
  • Hard-coded (32,35) and > 35 guard in population_tests.rs coupled only to case count; a future add/drop of a labeled case can silently desync numerator/denominator without check-fail.
  • Corpus case cites RIPR-SPEC-0231#13 by analogy (no numbered disjunction example); spec only adds prose in example 13, not a new 13a/13b numbered example.
  • Hard-coded (32,35) literals plus the >35 guard in population_tests.rs couple the dx-scoreboard pin to a hand-counted labeled-case set, which is the same drift surface flagged by a prior lane and unrelated to today's boundary change.

Copy link
Copy Markdown
Member Author

Review of record

Head: ea16a53. This is e593a95 plus a main merge. The only conflict was the currentness_matrix_python_deleted_statement golden, where I took main's fixture.

CI: green on this head, including Ripr Rust Small Result, Rust gates, Rust-only feature lane, windows-advisory-subset and source-of-truth.

Local proof on the merged tree:

  • goldens check and verdict-corpus check-all pass.
    • Rust: 57/440 false, oracle 32/35, 0 overclaim.
    • Python, Perl and TypeScript are unchanged.
  • 119 xtask corpus tests and 204 oracle unit tests pass.

Angles

  1. Correctness and edge cases (independent reviewer agent, plus delta re-reviews after each fix):
    • Disjunction drop-out for parenthesized || conjuncts.
    • Comment-prefixed groups.
    • Cap order versus is_inequality_assertion.
    • Disjunctions inside call or closure arguments. These stay non-deciding: assert!(matches!(pick(|x| x > 1 || x < 0), Ok(3))) keeps exact/strong.
  2. Spec and test oracle:
    • RIPR-SPEC-0231 rule 1 text matches the classifier, and "never raise a strength" holds.
    • The corpus case spec0231-ensure-disjunction-not-exact discriminates: with the classifier reverted, the related test reads exact_value/strong.
  3. External bots: CodeRabbit, Devin and the repo review bot.

Findings and resolutions

Finding Resolution
A deciding || still earned broad_error (CodeRabbit) ae238ff: caps to relational/weak in both classifiers. Smoke readings are not raised.
A leading comment hid a parenthesized group (CodeRabbit) ae238ff: conjuncts are masked first, with tests added.
An optional effect-observer arm earned mock_expectation (Devin) 59ef8b3: observer credit caps to relational/weak under a deciding ||. The && control keeps medium.
The scope extends beyond ensure! (Devin) Intended. Spec rule 1 names all four macros, and all corpora are unchanged.
spec0231 case-count pin was stale (CI) Bumped to 29.
Golden drift from main (#7577, #7680) Ported, then superseded by main's fixture in this merge.
Corpus case cites example 13 by analogy (repo bot) Documented decision in the PR body: the validator accepts only numbered examples. Not blocking.
Hard-coded population_tests pins and changelog/spec prose duplication (repo bot, parked) Not blocking. Filed as a follow-up issue.

Blocking findings: none open. All review threads are resolved.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit 260c9cf into main Oct 13, 2026
34 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/project-thread-4g2cqz-ensure-disjunction branch October 13, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

analysis(rust): ensure!(a != b || c == d) reads exact_value / strong

2 participants