Repository navigation
fix(rust): withhold exact-pin gaps on closure, returned-receiver and let-else shapes - #9488
Conversation
|
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 46 minutes. View limit details
Comment |
… by the pin (#9440) An exact direct pin of a changed closure tail, returned receiver or let-else exit was read as weakly_exposed/observation_unverified. Withhold it as static_unknown (rust_pinned_shape_unresolved) instead; SPEC-0265 slice adaptors, empty/zero inputs and non-exact pins keep their gap. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PResvVn1d7d3d4PYtRgdri
70b4b80 to
cf7c58d
Compare
… effect (#9440) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PResvVn1d7d3d4PYtRgdri
Review of recordHead reviewed: Angles (independent reviewer agents, read-only)
Findings and resolutions
No blocking findings. Negative controls ( Generated by Claude Code |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…osures, one-line let-else and dead equalities (#9440) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PResvVn1d7d3d4PYtRgdri
… for cache schema 1.91 (#9440) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PResvVn1d7d3d4PYtRgdri
Review of record, addendum for head
|
|
Generated by Claude Code |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- Two true-gap corpus rows (shape-let-else-branch-unreached, shape-windows-strict-vs-loose) read static_unknown instead of weakly_exposed; cases accept limited. Author acknowledges in PR body and tracks in #9490. This is documented cost, not a defect.
- StaticLimitKind additions and the cache schema bump 1.90→1.91 are mirrored across domain, lsp, seam_cache, xtask, and corpus tests; failure to mirror would surface as compile errors, not a security gap, but a missed mirror could let an unknown kind reach the wire as a typed limitation without a guard.
Verification questions
- Confirm devin's 5 narrowing concerns (dead equality, shadowed return, single-line let-else, never-called closure, traceability path) are correctness/withhold-tightening, not security exploits. Author replies in 66e271b cite control tests for each; rerun evidence is pending (cargo-test scheduled-late).
Refuted
- The closure-tail rule may cross a Worker/async detach or GC boundary.; refuted because: The implementation parses Rust syntax and inspects AST nodes with ra_ap_syntax; it neither invokes nor retains JS callbacks across asynchronous boundaries. Rust nodes and strings remain under ordinary synchronous ownership, so there is no Worker, GC, detach, transfer, or listener lifetime to analyze on this PR's changed path.
- The PR broadens syntactic acceptance beyond its unresolved-shape contract.; refuted because: The PR explicitly withholds without credit, requires exact whole-call pins, rejects conditional combinators/degenerate inputs/other exits, and parks runtime-sensitive crediting.
- Static_limit_kind is an attacker-controlled string written to JSON; an unrecognized value could let an attacker-influenced repo cause a denial-of-service or schema confusion in downstream consumers.; refuted because: StaticLimitKind is constructed only by the Rust enum; .as_str() is exhaustive and the new variant is mirrored into known_static_limit_kind (gap_artifacts.rs) and xtask KNOWN_STATIC_LIMIT_KINDS, so every emitted value passes the producer-side guard. The new value is a fixed identifier (rust_pinned_shape_unresolved), not user input.
Parked follow-ups
- Crediting these unresolved shapes and narrowing the syntactic approximations is explicitly deferred rather than silently broadened in this PR.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
Main took cache schema 1.91 (skip-guarded table rows); the pinned-shape limit moves to 1.92 / 0.99, and the three #9463 shape rows are blessed here. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PResvVn1d7d3d4PYtRgdri
Review of record, addendum for head
|
Main added rust_implicit_call_unresolved beside rust_pinned_shape_unresolved; both limits are kept. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PResvVn1d7d3d4PYtRgdri
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PResvVn1d7d3d4PYtRgdri
) The pinned-shape limit and the implicit-call limit make these rows non-false; verdict-corpus check fails on a listed row that is no longer false. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PResvVn1d7d3d4PYtRgdri
|
Note for whoever resolves the conflict on this PR: #9700 moved the Generated by Claude Code |
…esh snapshot, drop fixed known-false rows (#9440) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJgwEL5EqfhxV47nHYYpMV
|
Merged current main into this branch (3887cf1) and resolved the conflicts;
Generated by Claude Code |
There was a problem hiding this comment.
Verification questions
- Confirm whole-call recognition is hand-written over assertion text and accepts only tightly enumerated suffixes; valid exact pins using equivalent syntax may remain gaps.
Refuted
- Schema, LSP, policy, xtask, and documentation mirrors carry a non-executable taxonomy label; malformed mirroring would affect classification metadata rather than memory safety.
- Prior review concern about setup statements before assertions was discussed and resolved as conservative withholding, not an oracle overclaim.
- The new parser might introduce an OOB, UAF, type-confusion, or information-disclosure primitive by treating source strings as unsafe process data.; refuted because: Source parsing uses bounded Rust AST operations; changed lines determine shape eligibility, not memory access authority. No pointers, buffers, unsafe blocks, FFI, or secrets are involved.
- The prior unconditional-execution objection identifies a new false negative.; refuted because: The seeded discussion classifies it as a deliberate fail-closed limitation: unsupported setup control may withhold a gap but does not create an actionable false positive.
- The rule is conservative on execution uncertainty: unsupported or unmodelled exits leave the gap rather than credit the oracle.
- A cache or backing-store resize could leave the analyzer using stale active-view lengths.; refuted because: The diff contains no ArrayBuffer, TypedArray, resizable backing-store, transfer, detach, or length-snapshot logic; affected state is syntactic Rust AST text analyzed from the current source.
- The PR changes native memory ownership or introduces a memory-safety vulnerability.; refuted because: The diff contains no unsafe or pointer/lifetime ownership changes; unsafe-review completed with no new or worsened gaps. The change is analyzer classification and typed output metadata.
Evidence gaps
- The PR's reviewed integration proof is incomplete in this packet because cargo-test is scheduled but no receipt is supplied.
- The scheduled cargo-test receipt is the only execution evidence needed to settle that all focused red/green controls pass on this head.
- Model proof intent was rejected by deterministic validation.
Parked follow-ups
- The remaining uncertainty is conservative textual/AST classification of execution paths, not ownership or lifetime safety; unusual shapes may be withheld or left as gaps.
… after #9750 took 1.95 (#9440) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJgwEL5EqfhxV47nHYYpMV
|
Review of record on the delta, head 35e0778. Delta since the 3887cf1 review is one main merge: #9750 took cache generation 1.95, so this PR's schema moves to full 1.96 and sharded/compact 0.103 (docs, currentness constants, OUTPUT_SCHEMA examples, boundary_gap Generated by Claude Code |
|
Independent read of the merge delta on head
Not established: the required check result on this head and the combined-tree compile; hosted CI owns both. The earlier accepted limitation (setup control flow before the assertion) is unchanged and fail-safe. Generated by Claude Code |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- The whole-call parser accepts unbounded trailing parenthesized groups after the owner call, so wrapping does not necessarily keep the gap.
Verification questions
- Confirm the advertised controls do not cover an assertion nested inside the owner-call operand.
Refuted
- The AST/text analyzer could introduce a memory-safety or ownership vulnerability.; refuted because: The changed code uses safe owned-value APIs and contains no unsafe/native operation. Existing unsafe-review evidence found no new or worsened gaps.
- The changed analyzer logic might create a stale active-view region or unsafe backing-store access.; refuted because: The implementation parses Rust syntax and performs bounded AST/string operations; the changed paths contain no active-view buffer, resize, detach, transfer, raw pointer, or unsafe code.
- A spawned-thread or async-looking closure can create a worker handoff, detach, GC, or transfer boundary that changes ownership or lifetime.; refuted because: The diff adds static Rust syntax classification and fixture tests only; no thread, async runtime, FFI, unsafe block, pointer, or transfer implementation is introduced. The analyzer operates on owned source strings and parsed syntax nodes.
- The oracle can falsely withhold a real gap because setup control flow or macro wrappers are not modeled.; refuted because: This is an acknowledged conservative limitation: unsupported execution evidence withholds rather than credits, so it cannot create a false actionable signal; prior thread explicitly resolved this direction.
- The new analyzer logic is duplicated across classification and language-specific modules.; refuted because: The substantive logic is confined to pinned_shape.rs; language/rust/mod.rs only invokes the shared hook, and contract mirrors are declarative vocabulary/schema updates rather than behavioral duplication.
- The new source-string recognizers create an OOB, panic, or denial-of-service primitive.; refuted because: Parsing failure is fail-closed; delimiter scans require a closing delimiter; descendant traversal is AST-bounded; and no unbounded textual loop processes external secrets or attacker-selected data.
- The changed parser may create UB or cross a memory-safety trust boundary.; refuted because: The diff uses owned
ra_ap_syntaxtrees and string/range inspection; it introduces no unsafe code, pointer dereference, FFI, allocation-sensitive authority, or secret-dependent output.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- Public schema mirrors, cache generations, docs, and corpus projections are updated consistently, but the available packet still reports ripr failed and cargo-test pending.
|
Reply to the github-actions review (head 35e0778). Unbounded trailing groups in Assertion nested inside the owner-call operand. "ripr failed / cargo-test pending" in the evidence gaps refers to the in-flight required check on this head. Generated by Claude Code |
|
Merge log: squash 33f6b74 on head 35e0778. Required "Ripr Rust Small Result" passed on that head; the five Devin threads each had a fix reply (66e271b) and are now resolved; the github-actions review was answered above (fail-closed direction). Cache schema landed as full 1.96 / sharded and compact 0.103 after #9750 took 1.95. #9490 builds on this. Generated by Claude Code |
|
Post-merge review of squash Standing limitation, fails safe: Generated by Claude Code |
…h the stale shape-limit control Review finding (graphite, PRRT_kwDOSiSx0c6va-Sr): the applied-input distinctness check compared normalized literal TEXT, so equal values behind different spellings (2 vs 02, 1.0 vs 1.00) passed as pairwise different and credited the coincident pair 2 + 2 == 2 * 2 the rule refuses. Canonicalize the value (strip leading integer zeros and trailing fraction zeros) before the seen-set check, and pin the refusals with unit controls. CI red (Ripr Rust Small Result, runs 39873631526/39873631512): the single failing test a_returned_closure_the_test_applies_reads_as_a_ shape_limit asserted the pre-#9490 withheld reading for the exact shape this PR credits; it came in unchanged from #9488 via the main merge. Rewrite it as the inverse control (the shape-limit rule must not withhold the credited shape) and update its registered traceability path. Proof: pinned_shape_limit 19/19 and returned_closure_pin 5/5 in default and lang-rust-only lanes; owner_pin lib filter 320/320; clippy -p ripr --all-targets -D warnings clean; fmt clean; policy cascade (no-panic-family, process, allow-attributes, static-language, executable-files, network, lint-policy, traceability) all exit 0. goldens check drift is limited to typescript_enum_wrong_export and reproduces on the pristine PR head (inherited: #9881 re-blessed it on main after this branch's merge of main; the merge ref resolves it), no Rust classify golden drifts.
#9890) * feat(classify): credit an applied returned closure pin (#9490 slice 3) A pin that applies a returned closure (make_adder(2)(3)) now credits the closure body when every argument is a distinct nonzero numeric literal. RIPR-SPEC-0265 rule 5; shape-closure-returned-adder is credited/exposed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJgwEL5EqfhxV47nHYYpMV * fix(classify): canonicalize applied-closure literal values and refresh the stale shape-limit control Review finding (graphite, PRRT_kwDOSiSx0c6va-Sr): the applied-input distinctness check compared normalized literal TEXT, so equal values behind different spellings (2 vs 02, 1.0 vs 1.00) passed as pairwise different and credited the coincident pair 2 + 2 == 2 * 2 the rule refuses. Canonicalize the value (strip leading integer zeros and trailing fraction zeros) before the seen-set check, and pin the refusals with unit controls. CI red (Ripr Rust Small Result, runs 39873631526/39873631512): the single failing test a_returned_closure_the_test_applies_reads_as_a_ shape_limit asserted the pre-#9490 withheld reading for the exact shape this PR credits; it came in unchanged from #9488 via the main merge. Rewrite it as the inverse control (the shape-limit rule must not withhold the credited shape) and update its registered traceability path. Proof: pinned_shape_limit 19/19 and returned_closure_pin 5/5 in default and lang-rust-only lanes; owner_pin lib filter 320/320; clippy -p ripr --all-targets -D warnings clean; fmt clean; policy cascade (no-panic-family, process, allow-attributes, static-language, executable-files, network, lint-policy, traceability) all exit 0. goldens check drift is limited to typescript_enum_wrong_export and reproduces on the pristine PR head (inherited: #9881 re-blessed it on main after this branch's merge of main; the merge ref resolves it), no Rust classify golden drifts. * test(goldens): re-bless selector_swap_try_error_arm_control for the #9921 evidence-line wording (RIPR-SPEC-0122) Main's #9921 dropped the observation_unverified suffix from per-finding human evidence lines and re-blessed 57 human-full goldens; #9950 blessed selector_swap_try_error_arm_control in the same batch and kept the stale suffix, leaving main's own tip red on cargo xtask goldens check (reproduced on pure origin/main d91c149 and on this branch's merge ref: run 39955805404 failed only this goldens step after 20125/20125 nextest tests passed). Mechanical one-line re-bless to the current renderer with the bless ledger reason. * ci: probe event delivery for PR 9890 qualification * fix(classify): bind returned-closure exposure to discriminating applied pins Bounded review-owned adoption proposal for #9890 / #9490 slice3. Join effective-body numeric discrimination, literal/type/binding refusals, and required owner-pin enforcement before lexical token confirmation. Retain supported positive controls and independent honesty coverage. Canonical source custody remains with the existing PR author. * fix(classify): complete closure attribution checks and proof controls Preserve exact float discrimination and reject alternate result/callee attribution; retain native paired controls and fixture contract. * chore: raise spec-example floor to 183 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJgwEL5EqfhxV47nHYYpMV * chore: re-bless returned closure masking fixture after main output changes (#9490) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJgwEL5EqfhxV47nHYYpMV * lower rust missed_credit_ceiling to the blessed 133 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJgwEL5EqfhxV47nHYYpMV * re-bless returned_closure_arithmetic_masking for main's ReturnValue next-step wording (RIPR-SPEC-0265) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJgwEL5EqfhxV47nHYYpMV * resolve missed_credit_ceiling merge: rust 142 (main 143 minus this PR's returned-adder row) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJgwEL5EqfhxV47nHYYpMV * rust floor 204, missed_credit_ceiling 142 after merging spawn/join rule 4 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJgwEL5EqfhxV47nHYYpMV * rustfmt the returned-closure owner-tail chain Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJgwEL5EqfhxV47nHYYpMV * Judge returned-closure input distinctness on typed values Distinct decimal spellings can round to one f32/f64 input, so the pairwise-different requirement now compares the parsed typed values. Adds a rounded-equal f32 negative control and completes the traceability list for the returned-closure controls. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJgwEL5EqfhxV47nHYYpMV * test(goldens): re-bless returned_closure_arithmetic_masking for main's legend and repair wording (RIPR-SPEC-0265) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJgwEL5EqfhxV47nHYYpMV * fix(classify): resolve a bare constant in an associated fn against the enclosing item scope; list example 9 in the spec test mapping (RIPR-SPEC-0265) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJgwEL5EqfhxV47nHYYpMV --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: EffortlessSteven <steven@effortlessmetrics.com> Co-authored-by: Steven Zimmerman <steven@effortlesssteven.com>
Requested by Steven · project thread
Summary
Fixes #9440 (under #9410). An isolated exact
assert_eq!on a direct call read as "no assertion references the change" when the changed code sat in a closure the call runs, a statement acting on the returned value, or alet ... elseexit. Newrust_pinned_shape_unresolvedlimit withholds that gap asstatic_unknown(RIPR-SPEC-0240); nothing is credited.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Spec: RIPR-SPEC-0240
Governing issue or accepted claim: #9440
Acceptance delta (one sentence): The false-actionable Rust corpus rows from #9440 read
limited, with regression tests and a named limit.Candidate Relationships
Candidate branch: claude/project-thread-58r3x9
Stack parent or prerequisite PR (if any): none. Based on main after #9432 merged; four of the nine rows (adder, zero-input, collect-result, impl-trait-return-filter) moved to #9463 and are not re-blessed here.
Scope Classification
Decision
Withhold, do not credit. Whether the pinned input runs the changed closure or takes the
elseexit is not something ripr resolves here. Crediting spawn+join, an applied returned closure andResultcollect needs pin-rule additions with runtime controls: #9490.Corpus effect (on main: 535 cases, 9 false verdicts)
false_actionable->abstained, re-blessed here: shape-thread-join-result, shape-sort-direction-truncate, shape-let-else-branch-pinned.ideal->acceptable; cases acceptlimited).shape-closure-returned-zero-inputkeeps its gap: a zero input provably does not run the closure, so the zero-input rule excludes it.Why two true-gap twins read
limitedlet-else-branch-unreachedandwindows-strict-vs-loosediffer from their pinned twins only in which input value reaches the changed edge. Deciding that needs the input-to-branch evaluation that ripr deliberately does not do, so narrowing further would require crediting or evaluation, not withholding. The cost is bounded: two rows loseideal, both stay non-actionable and acceptlimited. Tracked in #9490.Proof
Full
cargo test -p ripr: only failures are pre-existing (match_arm_geometryfails on the base too;cli_smoke::pr_evidence_with_missing_artifacts_writes_error_packetneedsorigin/main). Cache schema bumped 1.90 -> 1.91. The boundary_gapunchanged-after-attemptsnapshot (pinned bycli_smoke::first_useful_action_corpus_pins_routing_cases) is refreshed for 1.91.Claim Boundary
May claim: these shapes no longer produce a certain gap. Must not claim: they are credited or that the pinned test notices the change.
Static Language Check
killed,survived,untested,proven, andadequate.🤖 Generated with Claude Code
https://claude.ai/code/session_01PResvVn1d7d3d4PYtRgdri