Repository navigation
Admit assert_ne and debug_assert* through the shared execution gate - #10404
Conversation
… gate (#8983) assert_ne!, debug_assert_eq!, debug_assert_ne!, assert! and debug_assert! (bare and std/core-qualified) now take the same execution admission as assert_eq!, so an assertion in a context that cannot run no longer credits a return-value or side-effect finding, and a dead sibling does not change a live assertion's credit. Boolean assert!/debug_assert! return-value credit from dead contexts stays open as #10389. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EAoMKstQhYv56x2g6gEHZG
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
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 42 minutes. View limit details
Comment |
There was a problem hiding this comment.
Verification questions
- Confirm the matrix claims coverage for all six macros, but its qualification loop only exercises bare and std:: forms, not core:: forms.
- Confirm the six admitted macros are limited to bare and std/core-rooted spellings, and qualified names still require root proof or a trusted standard-macro path.
- Confirm the public changelog says bare or std/core-qualified assertions are admitted, but the route matrix does not directly test core-qualified spellings or rebound roots.
- Confirm the new 264-case matrix exercises bare and std-qualified forms, but it does not visibly cover core-qualified spellings despite the implementation and changelog claiming them.
- Confirm the new integration matrix covers live and dead contexts but does not exercise buffer active-view semantics.
- Confirm the stated proof scope is broader than the matrix: only bare and std-qualified spellings are exercised, while implementation advertises core qualification and handles root rebinding/unbound-root proofs.
Refuted
- The change might mishandle an active view or stale length snapshot after a backing-store mutation.; refuted because: No buffer/view API or backing-store mutation is changed; the patch is limited to macro-name classification, root proof, syntax collection, tests, and changelog text.
- The change might broaden beyond the documented assertion family into unrelated sibling macros.; refuted because: The shared list is explicitly limited to six assertion macro leaves, and the test matrix exercises those names bare and with std qualification rather than introducing a broader macro classification.
Evidence gaps
- The focused matrix is scheduled late and its receipt was not yet available in this lane packet.
- The classifier and syntax collector both recognize the same six macro names, but the owning specification still appears to enumerate only the older set.
- The new integration test exercises dead and live contexts across all six macros and both bare/std forms, but the repository's ripr sensor failed with exit code 2 and cargo-test was not yet available.
- Model proof intent was rejected by deterministic validation.
) Review of 55fb28b found the check-helper collector still read only assert_eq/assert, so a helper-borne assert_ne!/debug_assert* lost credit once the gate covered it; the doctest root-proof refusal had the same narrow list. Both now use the shared lists. SPEC-0197 lists the admitted macros and the open #10389 residual, the changelog states the residual, and the tests are registered in traceability. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EAoMKstQhYv56x2g6gEHZG
|
Review of record, head 74ae0ab Angles (two read-only reviewer agents on 55fb28b, plus Devin and the github-actions bot; CodeRabbit and Gemini were rate-limited, so those providers are missing, not clean):
Proof on this head: matrix (264 rows) and helper test pass, Open: boolean Generated by Claude Code |
There was a problem hiding this comment.
Confirmed findings
- The ripr sensor failed without a diagnostic in the shared packet; this weakens independent review confidence but does not establish a source defect.
Verification questions
- Confirm the public changelog limits qualification to bare or std-qualified forms, while SPEC-0197 says bare or std/core-qualified; the implementation supports core qualification.
- Confirm the new matrix directly covers bare and std-qualified spellings but not core-qualified spellings or root rebinding, despite implementation support for core roots.
- Confirm core-qualified spellings are implemented and root-checked, but the new matrix does not directly exercise core qualification.
- Confirm the implementation advertises core-qualified admission, but the new matrix tests only bare and std-qualified spellings; core root behavior is therefore unverified by this oracle.
- Confirm the documented core-qualified behavior is implemented but is not directly represented in the new 264-case matrix, which tests bare and std-qualified forms.
- Confirm the 264-case matrix tests bare and std-qualified forms, but its live return-value credit assertion covers only assert_eq, leaving assert_ne and debug equality macros without a live-credit oracle.
Refuted
- The diff contains no JS-backed worker, async, GC, detach, or transfer boundary; its scope is assertion-macro execution admission and syntax collection.
- A stale active-view or resized backing store could make this change admit an assertion from an inactive region.; refuted because: The changed routes contain no buffer/view representation, mutation, resize, detach, transfer, or length snapshot; admission is determined from Rust source syntax and execution context.
- Adding assert_ne! and debug_assert*! to the shared gate could introduce a lifetime or aliasing hazard through extra admitted macro arguments.; refuted because: Admission changes only whether existing findings receive execution credit. No argument is evaluated, stored, borrowed, or dereferenced by this code, and no unsafe/native seam is modified.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- The failure of the ripr sensor leaves its exit code 2 reason unresolved, although other static sensors completed and cargo-test is scheduled late.
|
merge-queue/status.md line (write path refused in this session): Generated by Claude Code |
Summary
Before: only
assert_eq!(and bareassert!for some families) went through the execution-admission gate.assert_ne!,debug_assert_eq!,debug_assert_ne!anddebug_assert!credited findings from contexts that never run (afterreturn, uncalled fn or closure,if false, impossible match arm,cfg!(any())).After: all six assertion macros, bare or
std::/core::-qualified, take the same admission. Dead-context assertions no longer credit return-value or side-effect findings, and a dead sibling does not change a live assertion's credit.How: one
ADMITTED_ASSERTION_MACROSlist inclassify/owner_pin.rsdrives the gate, the compound-expression scan and the std-root proof; the syntax collector insyntax/owner_pin.rsnow collects the same six names.Source-of-truth Links
Governing issue or accepted claim: #8983
Acceptance delta (one sentence): assert_ne and the debug_assert* macros are admitted or refused by the same execution gate as assert_eq, bare or std-qualified.
Scope
Non-goals: boolean
assert!/debug_assert!return-value credit from dead contexts (#10389; gating it moves 6 Rust verdict-corpus rows including two idealgaprows tolimited), swallowed macros, outer infinite loops,process::exit.Proof
Matrix versus main (396 findings): 96 dead-context findings flipped to
reachable_unrevealed; no live, direct, mixed or extraction row changed.Claim Boundary
May claim: the six macros share one admission gate for the families covered by the matrix. Must not claim: boolean
assert!return-value dead credit is closed (#10389).Rollback
Revert the commit; no schema or generated-artifact change.
Spec-Test-Code Traceability
crates/ripr/tests/dead_context_assertion_admission.rscrates/ripr/src/analysis/classify/owner_pin.rs,crates/ripr/src/analysis/syntax/owner_pin.rsGenerated by Claude Code