Repository navigation
fix(rust): close getter-spelled and chain-built twin false credit, compare same-line rewrites (#7135, #10657) - #10668
Conversation
…n-built sides, compare guards and same-line rewrites (#7135, #10657) Getter-spelled read-only uses (d.history().len()) no longer count as driving history, a side built through the owner in its own let refuses the comparison, block conditions attach to the driving statements they guard, and the history window now ends at the assert on the read line. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes
|
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 11 minutes. View limit details
Comment |
…t the read (#10657) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- Getter metadata is propagated per binding, but the history comparison passes that getter into only_field_reads_between for every statement, so a direct field read and a getter-spelled read are treated alike even when their observable values differ.
Verification questions
- Confirm the new guard fixtures are static-analysis inputs, not executable Rust tests, so undefined helper functions do not demonstrate runtime discriminator behavior.
- Confirm the aggregate case table checks the expected exposed status for eight scenarios in one test, rather than yielding one independently named regression test per behavior.
Refuted
- The traceability file registers the aggregate test but omits two existing named tests in the changed integration file.
- Chain-built sides should retain argument-sensitive credit.; refuted because: The implementation intentionally refuses all owner-built chained sides because their statement history is not recoverable; this conservative boundary is specified in RIPR-SPEC-0228 and does not create a false positive credit.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- The ripr sensor failed with exit code 2, and the completed cargo-test receipt is not present in the supplied evidence, so the PR's claimed regression suite cannot be independently confirmed here.
|
Affected source-disposition review, /root/review_guard_history_disposition, exact head 8d1a2dc versus base dc38b8c. This is an unexecuted source lead, not a reproduced regression. The disposition in discussion4376621504 documents equivalent Please use the existing owner/reviewer lane to establish the same-case delta before final clearance: a compilable multiline Bag { items: Vec } with add(x) pushing x, tested against owner mutation push(x + 1). Two bags get the same initial push guarded respectively by Existing job40313930888/121543181701 records a focused HEAD pass but explicitly not red/green proof; guard intent was rejected/unsupported and red-green work deferred with zero matching receipts. Thus that packet does not settle this specific comparison. If new promotion is confirmed, conservatively repair admission and register a discriminating honesty case; if refuted, preserve the raw comparison and update the disposition. No duplicate native experiment, source/lifecycle change or qualification request was started by this review. Shared #10663/#10660 prerequisite and author custody remain intact. Sources: ripr-swarm/crates/ripr/src/analysis/classify/reveal.rs Lines 713 to 813 in dc38b8c ripr-swarm/crates/ripr/src/analysis/classify/reveal.rs Lines 793 to 858 in 8d1a2dc |
…erences stay refused (#10657) Guard text cannot prove two twins diverge (`if ready` vs `if ready == true`), so the comparison returns to refusing a pair that matches except for guards. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes
|
Source-disposition lead confirmed from the code and repaired in 772112c. Base histories dropped guard headers, so a pair matching except for its guards was refused; 8d1a2dc attached guard text and turned Tests (run through The github-actions finding about the getter being passed for every statement: the getter only widens which read-only uses are excluded, and Generated by Claude Code |
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm the new aggregate test exercises static-analysis fixtures only; it does not compile or execute the undefined guard helpers, so it cannot provide runtime discrimination proof.
- Confirm the new aggregate test exercises nine named analyzer scenarios but is represented as one Rust test, reducing failure localization and independent evidence granularity.
Refuted
- The new guard fixtures fail to prove runtime discriminator behavior because they reference undefined helpers.; refuted because: They are intentionally static-analysis inputs: the analyzer parses the source, and these cases test the classification rule rather than compiling/running a Rust test.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- The PR's validation claims are not yet backed by a completed cargo-test receipt in this packet; the only Rust sensor receipt, ripr, failed with exit code 2.
- The change remains sensitive to ad hoc text parsing around declarations, calls, and same-line statements; the available evidence does not include a completed cargo-test receipt, so broader syntax and regression coverage is not independently demonstrated here.
|
Successor source reconciliation at 772112c, reviewer /root/review_guard_history_disposition: acknowledged repair6416248309 is verified in source. Removing guard capture/history insertion restores refusal for guard-only differences; equivalent_spelled_guards_stay_refused and the updated differing-guards expectation agree. The prior code-level finding is repaired, not being asserted unchanged. Remaining requested proof is narrow: ready=false companion plus identical isolated fixture bytes through base dc38b8c, old candidate8d1a2dc and repaired772112c5, with native original/wrong-owner outcomes and the discriminating positive. The owner explicitly reports native wrong-owner runs were not executed. Current advisory40324463502/job121577468093 records a focused HEAD pass but red-green deferred with zero receipts and explicitly not current-head qualification; do not relabel that as the missing comparison. Please finish this in the existing lane without another broad campaign, and reconcile the PR title/body still saying differing guards retain credit. Shared prerequisite update: #10663/#10660 is now delivered on main at e4b0aaf, exact qualified tree and22038 tests verified. This removes that prerequisite only; ensure the actual next qualification subject contains it and preserve current findings, author custody and admission constraints. No source, native experiment, CI or lifecycle change was performed by this audit. |
There was a problem hiding this comment.
Decision
- Needs one verification check before upstream.
Verification questions
- Confirm the aggregate test covers nine analyzer scenarios, but one failed case reports only a scenario name rather than an independently named Rust regression test.
Refuted
- The PR body and title overclaim that differing guards keep credit, but the implemented policy, specification, changelog, and test expectation all say differing guards stay refused.
- The guard fixtures must compile and run to prove the classifier behavior.; refuted because: These are intentionally static-analysis source fixtures parsed by
check_workspace; they do not require runtime helper definitions. This addresses classification behavior, not native runtime discrimination. - The aggregate test cannot demonstrate behavior changes against the old implementation.; refuted because: The scenario table exercises the changed classification routes and encodes both false and true outcomes, so it is a suitable red/green oracle if executed on base and HEAD; execution qualification still awaits a completed receipt.
- The new guard cases demonstrate executable runtime discriminator behavior.; refuted because: False premise: these are static-analysis fixtures by design; undefined helpers are never compiled or executed, so the test proves classification behavior only.
- The PR title/body claim that differing guards retain credit, but the changed implementation and spec now keep guard-only twins refused.
Parked follow-ups
- The new behavior is covered by one aggregate Rust test with nine analyzer cases rather than independently named regression tests, limiting failure localization.
Evidence gaps
- Focused Rust validation is scheduled late and the existing ripr sensor failed with exit code 2, so this packet does not yet contain a successful completed cargo-test receipt.
- Model proof intent was rejected by deterministic validation.
- A completed current-head cargo-test receipt is not present in the packet; the available ripr sensor failed with exit code 2.
- Current-head cargo-test proof is not available in this packet.
…guage (#10657) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes
|
Run 40332209195 on 6b73c12 failed at Generated by Claude Code |
There was a problem hiding this comment.
Confirmed findings
- binding_built_through_owner searches every 'let ' occurrence and only filters the binding token, so a declaration in a nested or unrelated lexical context can be treated as the live binding and suppress credit.
Verification questions
- Confirm the aggregate test provides weaker failure localization than separately named Rust tests because one failing scenario only identifies its label in the aggregated mismatch vector.
- Confirm the aggregate regression test covers the requested getter, chain, same-line, guard, and later-shadowing cases but reports scenario names rather than independently named Rust tests.
- Confirm the aggregate test covers nine named analyzer scenarios but registers only one Rust test, limiting independent failure localization.
Refuted
- The new guard cases cannot serve as classifier tests because their helper identifiers are undefined.; refuted because: The fixtures are intentionally parsed as static-analysis source by check_workspace and are not compiled or executed; prior thread evidence explicitly confirms that design.
- The changed guard fixtures must compile and run to validate classifier behavior.; refuted because: They are intentionally parsed as static-analysis fixtures by check_workspace; they are not executable Rust runtime discriminators, and the spec now states the textual guard limitation.
- A chained owner-built side should retain argument-sensitive exposure credit.; refuted because: This is an intentional conservative boundary: chain histories are not recoverable, so all chain-built sides are refused; the prior thread explicitly records this decision and the specification states it.
Evidence gaps
- The available packet lacks a completed cargo-test receipt, leaving executable qualification pending.
- Current execution qualification is incomplete because cargo-test has no completed receipt and ripr failed with exit code 2.
- The packet has no completed cargo-test receipt; ripr failed with exit code 2, so changed Rust behavior is not currently execution-qualified.
- The test oracle is suitable for static-analysis red/green qualification, but current packet evidence does not show a completed HEAD execution or an old/base execution establishing behavior deltas.
- Model proof intent was rejected by deterministic validation.
|
Review of record, head 5f043a5 (contains main at e4b0aaf with #10663/#10660). Angles: correctness (window end, live-declaration scan, getter exclusion), tests (6 integration cases incl. negatives; 1885 classify lib tests), spec (RIPR-SPEC-0228 limits stated), perf/security (no new IO or allocation hot path), static-language and traceability gates. Findings and resolutions:
Evidence on this head: Generated by Claude Code |
Summary
Before: a twin comparison whose sides differed only by a getter-spelled read-only use (
c.add(20); d.add(20); let _ = d.history().len(); assert_eq!(c.history(), d.history())), or where one side was built through the owner in its ownlet(let d = Bag::new().add(20).clone()), still earnedexposedon main. A rewrite on the same line as the assertion was over-refused.After: both false credits are refused, and same-line rewrites keep their credit. Block conditions are deliberately not part of the history: guard text cannot prove two twins diverge (
if readyvsif ready == true), so twins that differ only by guards stay refused, as on main.How:
owner_fedcarries each binding's read getter, soonly_field_reads_betweenexcludes getter-spelled read-only uses.binding_built_through_ownerrefuses when a compared side is built through the owner in its ownlet, using only the declaration live at the read. The history window ends at theassertoffset on the read line. Spec RIPR-SPEC-0228 states the limits (textual comparison, chained sides refuse whatever their arguments, struct-literal "compared up to the first brace"), and all 6 tests incollection_read_non_discriminating.rsare registered in traceability.Swarm / Source Boundary
Source-of-truth Links
Governing issue or accepted claim: #10657
Acceptance delta (one sentence): getter-spelled and chain-built twin comparisons no longer earn exposed, and the same-line, traceability and spec edges from #7135 are closed.
Validation
cargo test -p ripr --test collection_read_non_discriminating: 6 pass on the head merged with main (e4b0aaf); on main the getter and chain cases fail.cargo test -p ripr --lib classify(1885 pass),cargo clippy -p ripr --all-targets -- -D warnings,cargo fmt --check,check-evidence-promotion-honestyandgoldens checkpassed on 772112c.🤖 Generated with Claude Code
https://claude.ai/code/session_01Fp8NXWwUjH6mmCimsKAPes