Repository navigation
spec(analysis): RIPR-SPEC-0370 changed for-range bound, old-vs-new per exact pin (#11399) - #11971
Conversation
…ew range per exact pin; fail-closed floor tests (#11399) Refs #11399. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmqg9H9w2Z6bowSS2Cz
|
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 27 minutes. View limit details
|
|
Review of record, head acc268f (source review; hosted proof pending). Angles: correctness, tests/oracle, spec/contract.
Producer (probe, per-pin range evaluation, cache generation bump) is deferred to a follow-up issue. 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! |
There was a problem hiding this comment.
Independent review (fresh-context reviewer, head acc268f): REVIEW_INCOMPLETE
Inspected:
- Subject: PR #11971, head
acc268f454c1391b2da8474bb264989165051eef, recorded basead8b265b821f2380f15cb6ea859214b46b2c9788; 10 files, +396/-0, no deletions. Governed by issue #11399, extending #6485 / RIPR-SPEC-0360. - Size, stated with the number I am using: the GitHub PR-level figure is 396 lines / 10 files, and the outstanding contribution against the current main tip
a69bf0214f7bd7e0537a1cdd07e95608e5a366e8is 396 lines across 10 paths with 0 lines already on main. The two agree; the candidate is wholly outstanding and far inside the admission action's 3000-line / 160-file ceiling. - Changed paths:
docs/specs/RIPR-SPEC-0370-loop-range-bound-change.md(+178, new),crates/ripr/tests/loop_range_bound.rs(+166, new),fixtures/rust-verdict-corpus/spec-scopes/RIPR-SPEC-0370.toml(+18, new),policy/doc-artifacts.d/RIPR-SPEC-0370.toml(+7, new),fixtures/{python,perl,typescript}-verdict-corpus/spec-scopes/RIPR-SPEC-0370.toml(+3 each, new),.ripr/traceability.d/loop-range-bound.toml(+15, new),docs/spec-index.d/RIPR-SPEC-0370.md(+1, new),changelog.d/11399-loop-range-bound-spec.md(+2, new). - This is a spec-and-proof slice: no production source file changes. The spec's own Implementation Mapping section names the producer files as "Planned, not part of the spec-and-proof slice".
- No independent review existed on this head before mine.
What the spec pins, read at this head:
RIPR-SPEC-0370 declares Status: proposed and defines a range-bound shape for a changed for header, then a fail-closed floor: "Until the producer lands, no pin of any argument may report a changed range bound as exposed." That direction is the safe one - the spec forbids a wrong exposed and explicitly says "a wrong exposed is worse than several missed advisories".
The spec is also careful about what it does NOT claim: it states that a changed range bound stays static_unknown until the producer exists, lists bounds that are expressions, method calls, .rev(), .step_by(..) or .len() as keeping static_unknown, says overflow is not modelled and panic counts as a kill, and makes "Changing the RIPR-SPEC-0360 accumulator credit rules" a non-goal.
It also names the trap it is refusing: treating the header as a return-value or boundary seam would let assert_eq!(sum_to(0), 0) grade the change as checked, "a false exposed, because nothing evaluates that n = 0 makes both ranges empty", while declining to start would contradict a test that does notice (assert_eq!(sum_to(5), 15) fails under 1..n). That is the right shape of argument for a specification.
Oracle strength:
crates/ripr/tests/loop_range_bound.rs is a public-API test: it drives check_workspace over a temporary Cargo workspace with a real diff patch, not an internal helper. The fixture helper header_findings collects the findings whose probe.location.line is the for header line, and it FAILS if there is no such finding ("premise: a finding on line 3, got ..."), so the test cannot pass vacuously by finding nothing. Two tests are active today and both assert the fail-closed floor: a_pin_on_an_empty_range_never_grades_the_changed_bound_exposed (the sum_to(0) pin, where 1..=0 and 1..0 are both empty) and a_bound_or_computed_pin_never_grades_the_changed_bound_exposed (a bound input, a computed expectation, and a >= comparison). Two producer tests are #[ignore]d with the reason "RIPR-SPEC-0370 producer not implemented: a changed range bound has no probe yet", and they state what the producer must add: credit a discriminating pin as exposed, and keep the empty-range pin as a gap rather than exposed.
The verdict-corpus scope for the new spec is not left to chance: fixtures/rust-verdict-corpus/spec-scopes/RIPR-SPEC-0370.toml waives each of the four acceptance examples individually with a stated reason ("no producer yet: the spec-and-proof slice pins the fail-closed floor in crates/ripr/tests/loop_range_bound.rs; a runtime-labeled corpus case lands with the producer"). I checked that the waivers are explicit rather than a blanket skip, and that the three other language corpora carry the analogous scope files. Registering the spec in the corpus this way means the corpus will start asking for these examples and will report them as waived - visible debt, not hidden debt.
The NEW SPEC artifacts are all present: docs/spec-index.d/RIPR-SPEC-0370.md, policy/doc-artifacts.d/RIPR-SPEC-0370.toml, .ripr/traceability.d/loop-range-bound.toml (which registers the two active tests and names crates/ripr/src/analysis/syntax/loop_accumulator.rs as the planned code owner), and the four corpus scope files.
Blocking:
None proven in the source. The gap to REVIEW_READY is hosted proof: the required Ripr Rust Small Result check is red at this head.
Hosted state at this head, newest run wins:
Run 41253319313 ("Merge-ready request acc268f..."): "Route Ripr Rust Small", "Detect Docs-Only Surface", "Admit PR Candidate", "source-of-truth" and "spec-maintenance-digest" are SUCCESS; "Ripr Rust Small on GitHub Hosted / Rust gates" (job 124691313768) is FAILURE at step 16 "Repository policy preflight"; the sharded test lane and the CX lanes are skipped; "Ripr Rust Small Result" is FAILURE. Run 41253319290 ("CI"): "Rust-only feature lane" is FAILURE; vscode, msrv, Perl and release proof, source-identity, rust-coverage, future-clippy, the paste matrix, ci-result and the advisory lanes are skipped. "Windows Advisory", "Security", "Printed Command Paste", "workflow policy and wheel applicability", "dependency-review", "cargo-deny", the wheel build and both Python journeys are SUCCESS; ub-review is SUCCESS; CodeRabbit is NEUTRAL.
Attribution for the red lane:
The failing step is "Repository policy preflight", and the gate message is the inherited check-process-policy orphan for crates/ripr/src/output/first_pr/run_chain.rs and the use std::process::Command allowlist entry. Neither file is in this PR's ten changed paths - this PR adds only documentation, test and fixture files - so this candidate cannot have caused it, and the same gate fails on main tip a69bf0214 with the identical message. The red lane is inherited, and it is still red here.
A consequence worth stating: because the gate stops at step 16, the steps after it - clippy, the verdict corpora among them - never ran at this head. That matters more for this candidate than for most, because this PR adds a spec scope to all four verdict corpora. Whether the corpus accepts the new scope and the four waivers was therefore not observed at this head.
Non-blocking:
- Duplicate spec number, and it collides on paths, not only on the id. #12007, "fix(analysis): treat deleted and cfg_attr Kani proof items as verification-only (RIPR-SPEC-0370)" (open, DRAFT, head
2a32ae8e3f445b39ef5d4a196e2c2e449fb7ee1f, base = the current main tip), claims the same spec idRIPR-SPEC-0370for a different subject - Kani proof harnesses andcfg(kani)/cfg_attr(kani, contract)attributes being verification-only, against issue #10749 - and writes to the same six registry paths this PR writes:docs/spec-index.d/RIPR-SPEC-0370.md,policy/doc-artifacts.d/RIPR-SPEC-0370.toml, andfixtures/{rust,perl,python,typescript}-verdict-corpus/spec-scopes/RIPR-SPEC-0370.toml. I compared the resulting blobs and every one of them differs. The two registry entries are not just different text, they are different corpus scopes - this PR registersscope = "in"with four per-example waivers, #12007 registersscope = "out"with a single reason - and the spec-index rows name different documents. Both cannot land as they stand: the id can only be issued once, and the six paths are a same-path different-content conflict rather than a merge. My reading of the deciding criterion, offered as a recommendation rather than a ruling: this PR is the stronger claim on the number, because it is open and non-draft, it is a complete spec-and-proof slice with active fail-closed tests and explicit per-example corpus waivers against a landed issue (#11399), and #12007 is a draft whose Rust lanes would be skipped in any case. But the number assignment belongs to the owner, and the minimum needed from whoever renumbers is that the losing PR id, its spec-index row, its doc-artifacts row and its four corpus scope files all move together. - The spec's
Linked PRs:field reads "None yet" although this PR is the spec's implementation slice. If the repository's spec policy expects a spec to name its own landing PR, that field is stale the moment the PR exists and should point here; if "None yet" is the convention for a proposed spec, no action is needed. I did not establish the convention, so I am recording it rather than asserting a violation. - The fail-closed floor is pinned by two active tests over three assertion shapes, while the producer's behaviour - four acceptance examples - is carried by
#[ignore]d tests that fail today. That is the correct arrangement for a spec-first slice, and the ignore reasons name the missing producer. The one thing to watch is that an ignored test is not a receipt: when the producer lands, those two tests must be un-ignored in the same change, and the spec's Test Mapping section says so. - The traceability fragment registers
crates/ripr/src/analysis/syntax/loop_accumulator.rsas the code owner even though that file is not changed by this slice. I did not establish whethercargo xtask check-traceabilityrequires the named code path to exist in the diff or only to be a declared owner; the gate did not run at this head, so I could not test it. Worth confirming before landing, since a traceability check that requires the named code to be present would refuse this slice. - Efficiency: no production code changes at all, so there is nothing to regress. The two active tests each build a temporary Cargo workspace and run one
check_workspacepass - a fixed amount of work per test, bounded by the fixture size, with no scan inside a loop and no shared state. The corpus scope files are three-line TOML fragments. Nothing here is a performance concern.
Not run:
- The Rust toolchain on this host is not on
PATH: nocargo test, clippy, fmt,cargo xtask precommit,cargo xtask check-traceabilityorcargo xtask check-spec-formatwas executed, and no local Rust receipt is claimed. Every Rust-level statement above comes from reading the spec, the tests and the fixture scopes at this head, or from hosted job logs at this head. - The two active fail-closed tests were not executed locally, and no hosted lane at this head executed them; the Rust-only feature lane is a different feature configuration and the Rust gates job stopped at the policy preflight. Their execution result at this head is NOT established.
- I did not verify the verdict corpora accept the new scope and its four waivers - that gate did not run at this head.
- I did not run the content-duplicate tool across the whole 116-PR open set. I did check the open set by hand for a competing claim on this spec, which is how I found #12007's collision on the id and the six registry paths (Non-blocking 1). I did not check whether some other open PR proposes the same for-range-bound subject under a different spec number.
Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head acc268f454c1391b2da8474bb264989165051eef. Not an approval.
|
Review of record refresh, head Hosted evidence on this exact head: Findings from the independent review at Merging. Generated by Claude Code |
…main RIPR-SPEC-0370 was taken by the loop-range spec (#11971); 0371 and 0372 are claimed on other branches. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmorcFfvgqr1j4EemBn
…ne spec to RIPR-SPEC-0371 (#11787) Main took RIPR-SPEC-0370 for the loop-range spec (#11971). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmqCNvFAErf575FjLhG
Requested by Steven · project thread
Governing issue or accepted claim: #11399 (Refs, not Closes: the producer is a follow-up)
Acceptance delta (one sentence): RIPR-SPEC-0370 records the contract for crediting a changed
forrange bound (old vs new range per exact pin) and pins the fail-closed floor that no pin grades itexposedtoday.What
crates/ripr/tests/loop_range_bound.rs: two active fail-closed tests (empty-range pin; bound/computed/relational pins neverexposed) and two#[ignore]d producer tests that fail today and state what the producer must add.RangeExprheader, per-pin old-vs-new range evaluation, seam cache generation bump. Too large to land fail-closed without local builds; follow-up issue to be filed.Local proof
Local cargo OOMs on this host; relying on exact-head hosted CI.
Generated by Claude Code