Repository navigation
feat(rust): credit #[test_case(.. => literal)] rows as the harness-compared return - #10734
Conversation
…mpared return (#9619) RIPR-SPEC-0231 rule 9: a clean arrow row reads as assert_eq!(returned, literal). Nine twin controls; lib-test-case-arrow-expected-value credits, 0 false verdicts. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rDKCvewzinJrP5bh5iuSY
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rDKCvewzinJrP5bh5iuSY
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rDKCvewzinJrP5bh5iuSY
….119 / file facts 1.48) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rDKCvewzinJrP5bh5iuSY
|
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 23 minutes. View limit details
Summary by CodeRabbit
WalkthroughEligible ChangesArrow-row oracle admission
Priority: Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant TestCaseRow
participant ArrowRowExtractor
participant TestFactAnalysis
participant OwnerPinAnalysis
participant ObservationChecks
TestCaseRow->>ArrowRowExtractor: provide attributes and function body
ArrowRowExtractor->>TestFactAnalysis: return eligible arrow-row oracles
ArrowRowExtractor->>OwnerPinAnalysis: provide row eligibility and oracles
TestFactAnalysis->>ObservationChecks: submit assertions with extracted oracles
OwnerPinAnalysis->>ObservationChecks: submit admitted assertions with extracted oracles
Merge Risk:
|
…; spaced attributes; more controls (#9619) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rDKCvewzinJrP5bh5iuSY
… 1.112 / 0.119 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rDKCvewzinJrP5bh5iuSY
Review of record — head
|
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- Arrow-row synthesis recognizes attributes syntactically as test_case, while owner-pin separately requires the module's extern_crate_path_holds test_case trust; the two gates are not visibly coupled in the new per-attribute admission.
Verification questions
- Confirm the public controls cover an entirely unimported function and a mixed readable/unreadable-row function, but not a trusted row combined with an unrelated untrusted test_case attribute.
Refuted
- Cache-version updates could preserve stale ownership-sensitive facts and create an unsafe re-use path.; refuted because: The schema versions are bumped for full, sharded, compact, and file-fact caches, and corresponding tests/fixtures are updated; the changed behavior does not introduce memory-safety assumptions.
- The change might read a stale or aliased mutable source buffer while extracting arrow expectations.; refuted because: The implementation repeatedly materializes owned attribute and body Strings and reads immutable RA AST nodes; it contains no mutation, unsafe code, buffer resize, detachment, transfer, or retained borrowed view.
- The changed worker/cache handoff paths may retain or transfer mutable JavaScript-backed state across asynchronous boundaries.; refuted because: No JavaScript runtime, worker, async task, garbage-collected handle, detach operation, transferable object, or mutable cross-boundary state appears in the changed Rust analysis code or fixture data. Cache invalidation is represented by schema-version bumps.
- A function containing both a readable literal row and an unreadable matcher row should still admit the readable row.; refuted because: This objection conflicts with the documented and tested all-or-nothing-per-function contract; the seeded thread confirms the choice was deliberate and the prior reviewer withdrew it.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- Full runtime confirmation remains dependent on the failed ripr sensor and the late cargo-test receipt.
- Final executable verification is not represented by completed sensor receipts in the supplied packet.
|
Reply to the github-actions review at Producer/admission coupling. The coupling is deliberate and the spec says where the gate is: the facts-layer synthesis is syntactic, and the RIPR-SPEC-0197 admission in Trusted row beside an unrelated untrusted attribute. Trust is per module, not per attribute, so there is no per-row mix to construct: every The Generated by Claude Code |
Governing issue or accepted claim: #9619
Acceptance delta (one sentence): The verdict-corpus row
lib-test-case-arrow-expected-valuemoves from limited to credited, with zero new false verdicts.What changed
RIPR-SPEC-0231 gains rule 9 and decision 8: the
test_caseharness compares the value a function returns with the literal after=>, so a clean row is read asassert_eq!(<returned expression>, <literal>).A function is read only when all of these hold (all or nothing per function):
test_case::test_case(the existing RIPR-SPEC-0197 trust);true/false, plain string);#[should_panic]or#[ignore].=> matches,=> with,=> panics,=> it/is, computed expectations, characters, statement-bearing bodies and untrusted imports stay unread, exactly as before (unidentified, never a "has no assertion" gap).Implementation:
extract/test_case_arrow.rssynthesizes the oracle once;syntax/ra.rsandfacts/parameterized_tests.rsattach it to the test fact;syntax/owner_pin.rsadmits the same synthesis in the RIPR-SPEC-0197 gate and teachestest_case_runs_bodythe arrow form. The reveal, hidden-input and observation checks are unchanged, so the credited oracle goes through the same checks as a writtenassert_eq!.Proof
crates/ripr/tests/test_case_arrow_expected_value.rs: 13 controls, each the credited twin with one thing changed. The review of record is in the first PR comment after the head.lib-test-case-arrow-expected-valuelimited to credited. Itsmissed-credit.tomlentry is deleted.cargo xtask precommitpasses.Not in this PR
=> matches,=> withand friends stay unread. The SPEC-0360 call-in-term extension forshape-async-await-accumulatefollows separately.🤖 Generated with Claude Code
https://claude.ai/code/session_014rDKCvewzinJrP5bh5iuSY