Skip to content

spec(analysis): RIPR-SPEC-0370 changed for-range bound, old-vs-new per exact pin (#11399) - #11971

Merged
EffortlessSteven merged 2 commits into
mainfrom
claude/issue-11399-loop-range-bound-spec
Nov 1, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
claude/issue-11399-loop-range-bound-spec

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

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 for range bound (old vs new range per exact pin) and pins the fail-closed floor that no pin grades it exposed today.

What

  • New spec RIPR-SPEC-0370 (proposed) with the standard NEW SPEC artifacts (spec-index row, doc-artifacts, traceability fragment, corpus spec-scopes for rust/perl/python/typescript).
  • crates/ripr/tests/loop_range_bound.rs: two active fail-closed tests (empty-range pin; bound/computed/relational pins never exposed) and two #[ignore]d producer tests that fail today and state what the producer must add.
  • Not implemented here: probe/seam for a RangeExpr header, 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

…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
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven EffortlessSteven self-assigned this Oct 31, 2026
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 149 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 9d1509f4-b428-4f4b-b7d2-071e8e500807
Commits

Reviewing files that changed from the base of the PR and between 99b2e4d and 358bde5.

Files selected for processing: 10
  • .ripr/traceability.d/loop-range-bound.toml
  • changelog.d/11399-loop-range-bound-spec.md
  • crates/ripr/tests/loop_range_bound.rs
  • docs/spec-index.d/RIPR-SPEC-0370.md
  • docs/specs/RIPR-SPEC-0370-loop-range-bound-change.md
  • fixtures/perl-verdict-corpus/spec-scopes/RIPR-SPEC-0370.toml
  • fixtures/python-verdict-corpus/spec-scopes/RIPR-SPEC-0370.toml
  • fixtures/rust-verdict-corpus/spec-scopes/RIPR-SPEC-0370.toml
  • fixtures/typescript-verdict-corpus/spec-scopes/RIPR-SPEC-0370.toml
  • policy/doc-artifacts.d/RIPR-SPEC-0370.toml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Copy link
Copy Markdown
Member Author

Review of record, head acc268f (source review; hosted proof pending).

Angles: correctness, tests/oracle, spec/contract.

  • Correctness: no production code changes; docs, policy, traceability and test-only.
  • Tests: the two active tests assert a negative (no finding on the for line is exposed) for an empty-range pin, a bound input, a computed expectation and a relational check. This holds today and after any sound producer. They share a premise that a finding exists on the header line; the issue's harness output shows one (static_unknown), but it is not run locally (cargo OOMs on this host), so hosted CI is the first execution. Two #[ignore]d tests state the producer contract and fail today by design.
  • Spec: RIPR-SPEC-0370 extends RIPR-SPEC-0360; the credit rule requires differing iteration counts and fold equality with the new range. NEW SPEC artifacts added (index row, doc-artifacts, traceability, four corpus scopes; rust examples waived with reasons until the producer adds runtime-labeled cases).
  • Findings: none blocking. Residual: the corpus scope/traceability gates have not run; any failure there is mechanical.

Producer (probe, per-pin range evaluation, cache generation bump) is deferred to a follow-up issue.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 31, 2026 23:37
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven EffortlessSteven left a comment •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review (fresh-context reviewer, head acc268f): REVIEW_INCOMPLETE

Inspected:

  • Subject: PR #11971, head acc268f454c1391b2da8474bb264989165051eef, recorded base ad8b265b821f2380f15cb6ea859214b46b2c9788; 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 a69bf0214f7bd7e0537a1cdd07e95608e5a366e8 is 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:

  1. 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 id RIPR-SPEC-0370 for a different subject - Kani proof harnesses and cfg(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, and fixtures/{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 registers scope = "in" with four per-example waivers, #12007 registers scope = "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.
  2. 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.
  3. 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.
  4. The traceability fragment registers crates/ripr/src/analysis/syntax/loop_accumulator.rs as the code owner even though that file is not changed by this slice. I did not establish whether cargo xtask check-traceability requires 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.
  5. 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_workspace pass - 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: no cargo test, clippy, fmt, cargo xtask precommit, cargo xtask check-traceability or cargo xtask check-spec-format was 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.

Copy link
Copy Markdown
Member Author

Review of record refresh, head 358bde567d02 (main merged into the branch; the slice's own 10 files are unchanged from acc268f454, so the earlier source/oracle review carries over).

Hosted evidence on this exact head: Ripr Rust Small Result is green. That includes the traceability, spec-format and corpus-scope gates that were unestablished at the earlier head, which resolves independent-review items 4 and the corpus note.

Findings from the independent review at acc268f454: none blocking. #12007 (draft) collides on RIPR-SPEC-0370 and its six registry paths. This PR is open, non-draft and carries the landed #11399 claim, so it keeps the number, and #12007 renumbers (noted there). Linked PRs: None yet follows the proposed-spec convention. The two producer tests stay #[ignore]d until #11972.

Merging.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit 0e4bf04 into main Nov 1, 2026
58 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/issue-11399-loop-range-bound-spec branch November 1, 2026 05:06
EffortlessSteven pushed a commit that referenced this pull request Nov 1, 2026
…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
EffortlessSteven pushed a commit that referenced this pull request Nov 1, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants