Repository navigation
fix(rust): arms that return the first arm's value leave its condition without a sink - #10133
Conversation
… without a sink (#9843) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfeyhVjKnck3hhzL3soJz1
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfeyhVjKnck3hhzL3soJz1
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 40 minutes. View limit details
Comment |
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm the implementation removes the return-value sink when any later non-diverging arm text-equals the first arm, but its comment and changelog imply unobservability for some inputs without requiring that the equal arm is reachable.
- Confirm the production change removes the first returned-value sink whenever any later non-diverging arm has the same textual value as the first arm.
- Confirm the corpus fixture demonstrates the intended limited verdict, but its acceptable verdict includes gap and limited, so it does not prove the production route is complete for other equal-value shapes.
Refuted
- The change might claim that every equal-arm shape is repaired into a gap.; refuted because: The implementation and PR claim are explicitly bounded to the one-line tail sink route; the authored corpus expected verdict is limited, with gap only an acceptable/ideal target.
- The corpus mutant evidence is internally inconsistent with the stated truth.; refuted because: The two tests-passing mutants are explicitly documented as behavior-changing but not observed by the authored tests, which is consistent with partially_discriminated rather than fully_discriminated truth.
- The corpus expects a stronger result than the implementation guarantees.; refuted because: The fixture explicitly accepts limited, matching the observed limited verdict and the PR's claim boundary.
- The change requires a broader cache or fixture redesign to remain consistent.; refuted because: Existing version constants, parity assertions, lifecycle fixtures, documentation, and corpus artifacts are updated in place; no parallel versioning scheme is introduced.
Parked follow-ups
- The implementation only suppresses the first condition when a later non-diverging arm has identical rendered text to the first arm.
Evidence gaps
- The new corpus case consistently classifies the changed condition as limited rather than falsely exposed, and the required trap floor is raised without changing the false-credit ceiling.
- Model proof intent was rejected by deterministic validation.
- Execution-level red/green proof is not present in the available sensor.
…t 134, python 30, perl 23) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfeyhVjKnck3hhzL3soJz1
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfeyhVjKnck3hhzL3soJz1
|
CI on 82bf190 failed in the Rust gates on The independent review of the exact head found no blocking issue; its one substantive finding (the multi-line rustfmt layout takes Generated by Claude Code |
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm the new production branch removes the first return-value sink whenever any later non-diverging arm text-equals the first arm, including an arm whose branch may be unreachable.
- Confirm the equal-arm check compares textual arm values and removes the first-arm sink whenever any later non-diverging arm matches, without proving reachability or semantic equivalence beyond textual equality.
- Confirm the corpus fixture accepts either gap or limited, so it demonstrates the expected abstention but does not prove completeness for other equal-value layouts.
Refuted
- The PR may claim that all equal-value shapes are repaired to gap.; refuted because: The implementation and corpus row explicitly limit the outcome to the one-line route and record limited; the seeded thread identifies the rustfmt-layout sibling separately.
- This patch repairs every equal-value arm shape into a gap.; refuted because: The implementation and claim are explicitly bounded to the one-line tail route; the rustfmt-layout sibling is tracked separately and match arms are not traced.
- The patch claims all equal-value Rust arm shapes are repaired.; refuted because: The implementation and claim boundary are limited to the one-line tail route; multi-line and match arms remain explicitly parked.
Parked follow-ups
- The change intentionally does not claim completeness for multi-line rustfmt layouts or match arms; those are residual follow-up scope.
Evidence gaps
- The scheduled cargo-test sensor is the remaining execution witness for the changed Rust behavior and fixture projections.
- Model proof intent was rejected by deterministic validation.
- Full test execution and the ripr sensor did not provide usable lane receipts here; cargo-test is scheduled late and ripr failed with exit code 2.
|
Review of record, head b78113e Angles: (1) correctness of the equal-arm guard in Findings: no blocking defect. Non-blocking: inner-whitespace and Resolutions: hosted failure on 82bf190 was drifted Proof on this head: required Generated by Claude Code |
Summary
Addresses the one-line form of #9843; the rustfmt-layout sibling is tracked in #10134.
if units >= 100 { 1 } else if units >= 10 { 1 } else { 3 }as a function tail readexposedfor the first condition, because the one-line tail sink treated the first arm as the returned value. When a later arm returns the same value, flipping the first condition can leave the returned value unchanged on some inputs, so the condition has no returned-value sink and reads as static-unknown instead of a false strong verdict. Later arms that agree only with each other keep the first sink.New corpus trap
trap-equal-arm-ladder(truth partially_discriminated, ideal gap, nowlimited; before this change it was a falseexposed).trap_floorrises to 34. No other corpus row moves.Cache generations advance to 1.100 / 0.107.
Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Spec: none specific; propagation sink shape in
classify/flow.rsGoverning issue or accepted claim: #9843
Acceptance delta (one sentence):
trap-equal-arm-ladderreads limited instead of false exposed, with a unit-test regression and a corpus floor; no other corpus row moves.Candidate Relationships
Candidate branch: claude/project-thread-9lsalp
Stack parent or prerequisite PR (if any): none (#9838 merged)
Scope Classification
Proof
Claim Boundary
May claim: a one-line if/else tail whose later arm returns the first arm's value no longer gets a returned-value sink for the first condition. Must not claim: the equal-arm shape is repaired into a gap (it reads limited), or that other equal-value shapes changed: the multi-line (rustfmt) layout is still affected (#10134) and match arms are untraced.
Static Language Check
killed,survived,untested,proven, andadequate.🤖 Generated with Claude Code
https://claude.ai/code/session_01JfeyhVjKnck3hhzL3soJz1