Skip to content

fix(pairing): pair a flag-selected local boundary through a forwarding test helper - #9525

Merged
EffortlessSteven merged 2 commits into
mainfrom
claude/9509-flag-local-pairing
Oct 22, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
claude/9509-flag-local-pairing

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

  • An equality fact between an owner parameter and a local that evaluated to a plain integer now reads bytes == 1024 instead of bytes == unit, whichever side the local sits on. The same-test loan pairing (rust: an assert_eq! inside a local check_* test helper is refused, so fully discriminated changes read weakly_exposed #6482) matches parameter == literal terms against the literals the helper call feeds, so it could never match the local's name.
  • Effect: a test helper that forwards its parameters to the owner and asserts the exact result (fn expect_tier(want, bytes, si) { assert_eq!(want, tier(bytes, si)) }) now pairs for a flag-selected local boundary. Before, the verdict stopped at weakly_exposed with same_test_pairing_missing.
  • Only plain integers rename the local. Boolean and text locals keep their name, so existing goldens do not move.

Swarm / Source Boundary

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

Source-of-truth Links

Proposal:
Spec: RIPR-SPEC-0158
ADR:
Plan item:
Governing issue or accepted claim: #9509 (parent #9276)
Acceptance delta (one sentence): A forwarding test helper that asserts the exact result pairs with a flag-selected local boundary, and a helper that computes an argument or asserts a weak property still does not.

Verification

  • New corpus subject authored-local-boundary-loan, three runtime-labelled cases: -hit (both mutants killed, now exposed), -blind (helper only asserts non-empty, both mutants survive, stays weakly_exposed), -bumped (helper passes bytes + 1, boundary mutant survives, infection_unknown). Mutant outcomes were run with cargo test on the subject.
  • verdict-corpus check-all: no row moved except the three new ones; false verdicts 0 of 3 on the new cases.
  • goldens check passes with no re-bless. cargo xtask precommit passes. Unit test an_equality_fact_names_the_integer_a_local_evaluated_to covers both orientations plus boolean and non-parameter negatives.

Not in scope: bytesize's real shape still has two callers and a method hop (#9329, next in the order).


Generated by Claude Code

…g test helper (#9509)

An equality fact between an owner parameter and a local that evaluated to a
plain integer now names the value (bytes == 1024) instead of the local
(bytes == unit), on either side of the comparison. The same-test loan pairing
matches parameter == literal terms against the literals the helper call feeds,
so a helper that forwards its parameters to the owner and asserts the exact
result now pairs. A helper that computes an argument or asserts only that the
result is non-empty still does not. Adds three corpus cases.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0139yZZvBRARmzGM2cfgBUuQ
@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 22, 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 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 100 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: 94a591a4-c356-41cc-aa74-83d112d311ce
📥 Commits

Reviewing files that changed from the base of the PR and between f023128 and d77e8af.

📒 Files selected for processing: 17
  • .ripr/traceability.toml
  • changelog.d/9509-flag-selected-local-loan-pairing.md
  • crates/ripr/src/analysis/classify/activation.rs
  • crates/ripr/src/analysis/classify/boundary_pairing.rs
  • docs/specs/RIPR-SPEC-0158-bounded-value-transfer.md
  • fixtures/rust-verdict-corpus/cases/local-boundary-loan-blind.diff
  • fixtures/rust-verdict-corpus/cases/local-boundary-loan-blind.json
  • fixtures/rust-verdict-corpus/cases/local-boundary-loan-bumped.diff
  • fixtures/rust-verdict-corpus/cases/local-boundary-loan-bumped.json
  • fixtures/rust-verdict-corpus/cases/local-boundary-loan-hit.diff
  • fixtures/rust-verdict-corpus/cases/local-boundary-loan-hit.json
  • fixtures/rust-verdict-corpus/expected/rows/local-boundary-loan-blind.json
  • fixtures/rust-verdict-corpus/expected/rows/local-boundary-loan-bumped.json
  • fixtures/rust-verdict-corpus/expected/rows/local-boundary-loan-hit.json
  • fixtures/rust-verdict-corpus/subjects/authored-local-boundary-loan.json
  • fixtures/rust-verdict-corpus/subjects/authored-local-boundary-loan/Cargo.toml
  • fixtures/rust-verdict-corpus/subjects/authored-local-boundary-loan/src/lib.rs.txt
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Copy link
Copy Markdown
Member Author

Review of record, head 560c651. Gemini and CodeRabbit are over quota, so no provider review exists.

  • Correctness and false-credit angle (independent reviewer, code trace only; it did not run the binary): the rewritten param == <int> fact is pushed only when both sides evaluated equal for that call row, and the parameter name comes from the same operand's parameter lookup. Booleans, text, hex, floats and suffixed values keep the local's name and cannot pair. Pairing still requires the fact on the helper call's own line, that call's exact text, one call per line, one owner call that is a whole compared operand, and the fed literal equal to the fact's literal. No false-credit path found.
  • Tests and corpus angle (mine, executed): -hit now exposed (both runtime mutants killed); -blind stays weakly_exposed (non-empty assertion, both mutants survive); -bumped stays infection_unknown (helper passes bytes + 1, boundary mutant survives). verdict-corpus check-all moves no other row; goldens check needs no re-bless; precommit passes. A first version renamed boolean locals too and moved the binding_value_family_matrix golden; the integer-only gate removed that.
  • Spec and contract: RIPR-SPEC-0158 gains the rule; changelog fragment added.
  • Findings: none blocking.

Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 22, 2026 06:10
@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!

Copy link
Copy Markdown
Member Author

windows-advisory-subset is red again on the new head with the same two quoting tests tracked in #9521 (see my comment on #9523); this PR touches no quoting code. It is advisory and no fix has merged to port. Watching the required checks.


Generated by Claude Code

@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

… own test file (#9509)

Review found the rewritten parameter == integer fact is pooled across related
tests and matched by line and call text, so a second file's helper call on the
same line could pair through another file's unasserted boundary call. The fact
now carries its test file and loan pairing requires it to match. Adds the unit
control and the traceability rows.

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

Copy link
Copy Markdown
Member Author

Review of record update, head d77e8af. My earlier independent trace (head 560c651) missed the pooled-fact path that Devin found; I then reproduced it (scratch crate, exposed wrongly) and fixed it by carrying the test file on the rewritten fact and requiring a match in loan pairing. Re-verified on this head: the scratch crate reads weakly_exposed, the flag-selected helper shape still reads exposed, goldens check and verdict-corpus check-all pass, precommit passes. A two-file corpus subject was not added; the unit control and the scratch reproduction cover it. Both Devin threads are replied to and resolved. Removing and re-adding merge-ready to restart required CI on the new head.


Generated by Claude Code

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Confirmed findings

  • Lane scope (JS worker handoff / async / GC / detach / Transferable) does not apply: this is a pure Rust analyzer change with no JS runtime, no workers, no transferable buffers. Out-of-scope by design.
  • Traceability entry adds the two activation/pairing unit tests but lists neither the new corpus cases nor the authored subject, matching the #9276 precedent cited in the review-of-record. Devin-2 raised this earlier and the author marked it fixed; including cases/subjects in the spec mapping would make the pairing behavior more discoverable from spec to fixture.

Verification questions

  • Confirm checked corpus siblings cover exact forwarding, weak assertion, and computed argument helper behavior, but not nested or method-based forwarding wrappers.
  • Confirm corpus fixtures encode distinct exact, weak, and computed-argument routes and expect exposed, weakly_exposed, and infection_unknown respectively.

Refuted

  • Computed or weak helper assertions should produce the same pairing credit.; refuted because: The pairing route still requires exact parameter/literal terms and the corpus retains distinct bumped/blind outcomes; broad execution remains residual risk.
  • A second architecture is needed: a global fact->test index keyed by (file,line,text) rather than per-test stamping.; refuted because: Per-test stamping is strictly smaller: it adds one Option field, one Some(...) site in the renamed branch, and a single is_none_or predicate. A global index would change ownership, threading, and cache shape for the same correctness property. The smaller fix is also testable with one unit control (a_fact_from_another_test_file_does_not_pair_a_loan_call_on_the_same_line).
  • Subject authored-local-boundary-loan is a same-file helper-fan-out; a true two-file false-credit repro is missing from the corpus and only covered by a unit test in boundary_pairing.; refuted because: Author explicitly notes on the review of record that a two-file corpus subject was not added; unit control + scratch reproduction cover the path, and prior goldens check/verdict-corpus check-all/precommit pass. The corpus remains conservative (3 new rows, no movement of others).
  • Renaming the local's side to the integer value could cause a non-Parameter side (e.g. literal 1024 on both sides) to be misclassified as a parameter, enabling a new pairing path; refuted because: EqualitySide::new classifies side as Parameter only when parameter == Some(text.trim()) and resolved is not a Local; a literal-equal literal operand takes SideKind::Other and keeps both texts. Unit test asserts a == b case stays names_value==false.
  • The change could involve active-view backing-store aliasing, resize/detach, or stale length snapshots.; refuted because: False premise: no buffer, ArrayBuffer, TypedArray, resize, detach, transfer, or length-snapshot implementation appears in the changed code or supplied diff.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

Parked follow-ups

  • Fact.file identity is a path equality (*file == test.file) on PathBuf. Symlinks or repo-relative vs workspace-relative path forms on the same on-disk test file would compare unequal and the fact would not pair for that test. Not a security issue; flagged as residual for human review of the corpus sandbox path normalization.
  • The real bytesize caller/method-hop shape is intentionally parked rather than part of this analyzer change.

@EffortlessSteven
EffortlessSteven merged commit b98867f into main Oct 22, 2026
52 of 53 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/9509-flag-local-pairing branch October 22, 2026 08:44
EffortlessSteven pushed a commit that referenced this pull request Oct 22, 2026
…9441)

Main's ledger wiring test failed after #9525 fixed these cases.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014doxtTEYf5uCgqiWJV8ffG
EffortlessSteven added a commit that referenced this pull request Oct 22, 2026
…tests (#9568)

* ci(windows): read the selector consumer from the same ref as the storage tests (#9521)

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

* ci(windows): build the hang-hunt server into the checkout target (#9526)

The external target-dir left the repo cargo config's relative TEMP pointing at a
missing directory, so every shard failed at link time (LNK1104).

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

* ci(windows): fix hang-hunt PowerShell parse error in log-copy message (#9526)

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

* ci(windows): cover pipe-vs-redirect and release-vs-debug in the hang hunt (#9526)

24 redirected debug-server iterations did not hang; the packaged rehearsal pipes
through Tee-Object and uses a release server.

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

* ci(windows): spell the hang-hunt release build as a literal command (#9526)

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

* fix(corpus): drop three known_false rows that no longer score false (#9441)

Main's ledger wiring test failed after #9525 fixed these cases.

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

* Drop the stale-ledger edit; #9588 owns main's known_false drift

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

* test(ci): exercise the hang hunt's generated pipe script with a controlled nonzero child (#9526)

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

---------

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