Repository navigation
fix(classify): a helper returning its two parameters sinks its condition at the first branch (#6694) - #13169
Conversation
…ion at the first branch (#6694) A private generic helper whose whole body is if cond { a } else { b } over two distinct parameters (capped(value, cap)) had no return sink for its condition, so a boundary change tested through an exact forwarding wrapper read propagation_unknown although reach, activation and the wrapper pairing (#6780) were already established. The rustfmt tail form now sinks the condition at the first branch parameter, fail-closed: the if is the whole body, the owner returns a value, the probe is that condition and the branches are distinct bare parameters. spot-cap-generic-via-wrapper now credits. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUbb9AWcGogtEPEAMB
|
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 13 minutes. View limit details
|
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Source review of head 0002d74. An independent no-stake adversarial pass found no blocking items: the new sink requires the probe to be the helper's sole if condition, a seven-line body with no earlier statement, a non-unit return, and two distinct bare parameter names. The listed shadowing and non-bare forms all fail closed. Tests carry negatives (statement before the if, repeated parameter, non-parameter branch, trailing statement, unit return, transforming wrapper, loose assertion, duplicate helper name) that would fail if the rule were over-broad. Only spot-cap-generic-via-wrapper moved in the verdict corpus.
Non-blocking: docs/PUBLIC_PROOF.md still shows the old row (advisory drift); no unit negative for "probe is not this if" (code-guarded). Local proof from the author: precommit, goldens, fixtures, verdict-corpus, lib tests, helper_wrapper_reach. Hosted exact-head proof pending.
Generated by Claude Code
ripr static exposure checkCommit Took 57s. |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Bounded source review — 2026-11-05 UTC
- reviewed_head_sha:
0002d748f6186eea39f9d53cc782ac0e18f39514. - integration_basis: PR base
cfdb62e56d53830fcf8bc12b8e37fd8741b1b67e; authored patch and candidate source reviewed. No newly executed integration qualification. - claim_boundary: #6694 multiline whole-helper parameter branch sink only; strsim bodies excluded
- changed_surfaces_and_semantic_owners_inspected: Read complete 7-file diff, flow.rs predicate_flow_sinks and propagation functions, helper_wrapper_reach added controls, SPEC0186 and verdict row. Whole-body/line/identity/distinct-parameter gates prevent statements and repeated arms from this path. New positive class expectation would fail old missing-sink behavior; wrapper negatives retain lower classifications. Body-mutating conditions and sink pairing beyond supplied cases not executed.
- blocking_findings: No additional actionable source finding established in this bounded review. Existing blockers and draft constraints retain their recorded scope.
- non_blocking_suggestions: None added.
- refuted_or_stale_findings: Existing thread dispositions retained; any specific repaired or refuted case is described in the inspection above. No thread is resolved by this review.
- proof_and_ci_observed: Immutable source and changed tests inspected. No native tests, hosted job logs or artifact qualification independently executed/inspected in this pass.
- proof_or_review_missing: No workspace Cargo tests, complete golden suite, hosted job logs/artifact receipts, or full integration qualification independently executed/inspected by this reviewer. Existing author and bot reports retained as reported only. No REVIEW_READY claim.
- affected_currentness_dimensions: This record binds source inspection to the head above. It does not establish fresh base-composition, hosted execution, package, release or cross-platform qualification.
- residual_assumptions_and_non_claims: Source/test reading and historical author reports are not additional test executions. No merge-readiness approval is implied.
- disposition: REVIEW_INCOMPLETE; no new actionable source finding in the stated inspection.
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Final source review of head 0002d74, superseding the earlier bounded REVIEW_INCOMPLETE on this head (that pass inspected source only and found no actionable finding). Two independent no-stake source passes found no blocking items on the whole-helper parameter-branch sink. Hosted exact-head jobs (gates, 4 test shards, goldens, fixtures) have now run on this head; the only failure was the review-disposition recheck reading the stale incomplete review. Non-blocking: docs/PUBLIC_PROOF.md drift (advisory).
Generated by Claude Code
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Final source review of head 0002d74. Two independent no-stake passes found no blocking items in the whole-helper parameter-branch sink; the fail-closed gates and negative tests were read and hold. Non-blocking: docs/PUBLIC_PROOF.md drift (advisory). Hosted exact-head jobs have run on this head.
Generated by Claude Code
Governing issue or accepted claim: #6694
Acceptance delta (one sentence): A private generic helper whose whole body is
if cond { a } else { b }over two distinct parameters now has its condition as a return sink, so a boundary change tested through an exact forwarding wrapper readsexposedinstead ofpropagation_unknown.What was wrong
#6780 already established the wrapper-to-helper reach (RIPR-SPEC-0159) and paired the wrapper's exact pin with the helper boundary (RIPR-SPEC-0186): on current main the issue's
capped/capped_scoreexample reads reach yes, infection yes, discriminate yes, and stillpropagation_unknown. The residual named on the issue is owner-local:predicate_flow_sinksfinds no value sink forif cap < value {/cap/} else {/value/}becausenext_branch_valueonly accepts branch lines that look like a call, literal or arithmetic, never a bare parameter name, andtail_if_branch_valueonly reads the one-line form.Change
tail_if_parameter_branches(analysis/classify/flow.rs, called frompredicate_flow_sinks) sinks the condition at the first branch value for the rustfmt tail form, fail-closed: theifis the helper's entire body (no earlier statement can rebind a parameter), the owner returns a non-unit value, the probe is thatifcondition, and both branches are bare, distinct parameter names of the owner (call_parameter_names). Literal, call, repeated or non-parameter branches keep the existing adjacency reading. No new validator: the sink feeds the existing propagation, pairing and oracle stages, so the exact-wrapper-pin requirement is still enforced where it was.Proof
parameter_returning_tail_if_sinks_the_condition_only_when_whole_and_distinct(positive; statement before theif, same parameter in both branches, non-parameter branch, trailing statement, unit-returning owner all give no sink).helper_wrapper_reach.rs):generic_helper_behind_a_constant_argument_wrapper_pairsnow assertsexposed;parameter_returning_helper_is_exposed_only_through_an_exact_forwarding_wrapperhas the positive plus negatives for a wrapper that transforms the argument (value * step()), a non-exact wrapper assertion (assert!(.. > 5)), and two helpers of the same name. Each is notexposed.spot-cap-generic-via-wrappermoveslimitedtocredited(its ideal verdict); it is the only row that moved. Itsmissed-credit.tomlentry is removed, the case'shard_casetext updated, andexpected/re-blessed. 330/330 spec examples, operator grid 21/21, overclaim 0/49.cargo xtask goldens check,fixtures,precommit(includes clippy-D warnings),cargo test -p ripr --lib(17939 pass),helper_wrapper_reach(93 pass).changelog.d/6694-parameter-returning-helper-sink.md.Not run: the full Rust-only lane (
--no-default-features --features lang-rust); the shared disk repeatedly filled during this work, and the last lane run on main already had an unrelatedregistered_proptest_profilefailure.The strsim
generic_hamming/generic_jaropilot seams from the issue use a different body shape and are not covered by this rule; the issue can stay open for them or be closed on the corpus case, a call for the reviewer.Generated by Claude Code