Skip to content

test: pin limitation failure states and base-side findings across surfaces - #11904

Merged
EffortlessSteven merged 2 commits into
mainfrom
claude/11821-limitation-failure-states
Nov 1, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
claude/11821-limitation-failure-states

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Governing issue or accepted claim: #11821
Acceptance delta (one sentence): Tests pin that a missing, in-flight, stale or unknown-item limitation read answers with a typed failure instead of a limitation document, and that a base-side (base_deleted) finding is never offered as a repair route on MCP, CLI or LSP hover.

Change (tests only, no production change)

  • mcp/workspace.rs: a_missing_stale_or_unknown_limitation_read_never_yields_a_limitation_document covers no_snapshot, analysis_in_flight, stale_snapshot and item_not_found for get_limitation.
  • lsp/hover.rs (top_limitation_parity_tests): a_base_side_finding_is_never_offered_as_a_repair_route_on_any_surface. MCP names not_candidate_actionable (stage not none); the CLI says the source is not a candidate edit target; hover offers no repair instruction or ripr repair command.

Proof

cargo test -p ripr --lib -- top_limitation_parity a_missing_stale_or_unknown: 4 passed (these 2 plus the 2 from #11829). cargo fmt --check passes. cargo xtask precommit not run locally (host OOM on full builds); hosted CI is the gate.

Findings from the cross-surface probe (not fixed here; filed separately)

  • Hover does not name base_deleted at all, while the CLI does.
  • The CLI still prints a Next step ("add a boundary assertion…") for a base-deleted finding that MCP refuses as not repair-ready.
    Both change rendered text and goldens, so they are not folded into a test-only PR.

Not claimed

The VS Code adapter and the LSP code-action text remain open on #11821.


Generated by Claude Code

…surfaces (#11821)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPbrnaom45UcHBf
@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!

@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 57 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: 1f305a85-85cb-469c-b8f0-a306b3d25c7e
Commits

Reviewing files that changed from the base of the PR and between 714aed0 and 679cc5f.

Files selected for processing: 2
  • crates/ripr/src/lsp/hover.rs
  • crates/ripr/src/mcp/workspace.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Copy link
Copy Markdown
Member Author

Review of record, head c86287d (self-review of the exact head; bot reviewers are quota-limited).

Angles: oracle strength, claim boundary, test-only scope.

  • Failure states: the test goes through the real WorkspaceSession::get_limitation for four states and asserts each typed code, so none can return a limitation document (which would read as a route). It reuses the existing expect_code helper.
  • Base-side finding: assertions pin the MCP kind and stage, the CLI's own disclosure line, and the absence of a repair instruction or ripr repair command in hover. The probe output that drove these assertions showed the hover and CLI gaps now filed as base_deleted finding: hover omits the base-side disclosure and the CLI still prints a Next step #11905; the test pins only what holds today.
  • Scope: test-only, no production edit, no goldens.

Findings: none blocking. The hosted result on this head is the remaining gate.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 31, 2026 21:32
@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!

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Decision

  • Needs verification checks before upstream.

Verification questions

  • Confirm the base-deleted test rejects a limitation document only after constructing it directly; it verifies MCP kind/stage and CLI/hover disclosure independently.
  • Confirm the PR establishes behavior for named surfaces but does not establish repository-wide sibling-path closure for limitation reads or repair-route rendering.

Parked follow-ups

  • Hover and CLI non-repair behavior is asserted separately rather than through a shared cross-surface predicate, so future wording changes could require coordinated golden or contract updates.
  • The hover test may be narrower than its name because it does not assert that base_deleted itself is named.

Evidence gaps

  • The PR changes only tests, but no completed cargo-test receipt is supplied; the ripr sensor also failed with exit code 2.
  • Model proof intent was rejected by deterministic validation.
  • Runtime red/green proof remains unavailable in this packet despite the seeded PR body reporting focused passing tests.
  • The PR claims four limitation states always return typed failures, but no completed test receipt currently confirms the new assertions.

@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 c86287d): REVIEW_INCOMPLETE

Inspected:

  • crates/ripr/src/mcp/workspace.rs at head c86287d6 and base fa621a32. The whole change is the new test a_missing_stale_or_unknown_limitation_read_never_yields_a_limitation_document (:2895-2926), four expect_code assertions and nothing else.
  • crates/ripr/src/lsp/hover.rs at the same two SHAs. The whole change is the new test a_base_side_finding_is_never_offered_as_a_repair_route_on_any_surface (:2681-2724), and nothing else.
  • The governing spec docs/specs/RIPR-SPEC-0211-mcp-workspace-session-evidence.md: the read-failure contract (:358-361), acceptance clause 2 (:499-505), and the spec's own ## Test Mapping section (:525-552).
  • The governing spec for base-side evidence, docs/specs/RIPR-SPEC-0152-candidate-actionable-projection.md: the eligibility authority (:19-23), the Required Evidence recurrence clause (:75-79), and the acceptance examples (:101-113).
  • The rendering the CLI assertion depends on, crates/ripr/src/output/human/sections.rs:624 ("source: {} -- base-side evidence, not a candidate edit target"), and the hover string the hover assertion depends on, crates/ripr/src/lsp/hover.rs:796 ("static limitation -- no bounded repair instruction available").
  • .ripr/traceability.toml: the RIPR-SPEC-0211 "MCP workspace session evidence" behavior entry (:15647-15651), which registers sibling crates/ripr/src/mcp/workspace.rs::tests::* tests, and the absence of any top_limitation_parity_tests entry.
  • The merged sibling pull request #11829 ("test: top-limitation parity across MCP, LSP hover and CLI (+ fix MCP reason wording)"), which ships the same issue's parity tests and a changelog fragment and updates no spec or traceability entry.
  • Hosted proof for this exact head and for the base, grouped by workflow run, and the failing shard's log.

Blocking:

None found. Both new tests are honest, discriminating proofs of behavior the repository's own specs already state, and neither changes production code:

  • The MCP test discharges a contract the spec already owns. RIPR-SPEC-0211 states that on a usable root "reads before the first successful refresh fail closed with no_snapshot; reads during an attempt report analysis_in_flight; unknown item ids fail closed with item_not_found" (:358-361), and acceptance clause 2 repeats it together with stale_snapshot (:499-505). The new test asserts exactly those four typed codes against get_limitation, so it is a true discriminator: if the read returned a limitation document instead of a typed failure in any of the four states, the corresponding expect_code would fail. The test name also states the reason the four states matter -- a limitation document where the limitation cannot be established is something a client could read as "no limitation, so a repair route".
  • The hover test is discriminating on the surface it covers. It sets source_currentness = BaseDeleted and asserts that the hover contains "no bounded repair instruction available" and does not contain "ripr repair", which is the observable form of RIPR-SPEC-0152's rule that base-side evidence is "not a candidate edit target" and drives no repair obligation.
  • No spec clause needs narrowing here. This pull request adds missing proof for existing contracts rather than changing behavior, so unlike a contract-changing change there is no clause to narrow. Checked and cleared on that point.
  • No fixture or golden moves: both additions are unit tests, and no production or rendered output changes.

Non-blocking:

  1. The hover test's name claims an invariant it does not establish on the CLI surface, and the pull request body says so. The test is named a_base_side_finding_is_never_offered_as_a_repair_route_on_any_surface, but the CLI assertion only checks that the rendering names the disposition -- "base_deleted -- base-side evidence, not a candidate edit target" (crates/ripr/src/output/human/sections.rs:624) -- and the body discloses that "the CLI still prints a Next step ("add a boundary assertion...") for a base-deleted finding that MCP refuses as not repair-ready". So on one of the three surfaces the test names, a repair route is still offered, and the test neither asserts its absence nor asserts its presence. The disclosure in the body is the right practice, but the name is what a future reader greps to find the guard, and it currently advertises a stronger invariant than the code holds. Either narrowing the name to what the test proves, or adding the CLI assertion -- which would then fail, surfacing the divergence the body already describes -- would close the gap; the production fix itself is the separate slice the body names.

  2. The change ships no changelog fragment, while the pull requests this one most resembles do. #11829, the merged sibling that added the top-limitation parity tests for the same governing issue #11821, ships changelog.d/11821-mcp-limitation-reason-family-wording.md, and the two comparable test-only pull requests in this repository (#11913 with changelog.d/4518-python-first-pr-receipt-status-controls.md, #11823 with changelog.d/kani-actionability-proofs.md) each ship one as well. cargo xtask check-changelog-fragments validates the fragments that exist rather than requiring one per pull request, so this is not a gate failure; it is a release-notes gap for a pull request whose stated purpose is pinning cross-surface failure states.

  3. The new tests are not registered in the repository's spec-to-test records, but that matches the convention for this class of change. RIPR-SPEC-0211 carries a ## Test Mapping section (:525-552) that names sibling mcp/workspace.rs::tests::* tests, and the .ripr/traceability.toml entry for the same behavior registers them too, so registering the new MCP test would be consistent and worth doing. The merged sibling #11829 added parity tests for the same issue without touching either record, and no top_limitation_parity_tests entry exists at all, so the hover side has no record to extend. I record this as an observation about where the records are thin rather than as a defect in this pull request, because the sibling precedent for exactly this kind of change set the convention the repository is currently following.

  4. The hover assertion uses a negative substring test for the repair command (!hover.contains("ripr repair")), which is the right shape for "offers no repair command" but is sensitive to the exact spelling. The accompanying positive assertion on "no bounded repair instruction available" carries the real weight, so the pair is adequate.

Not run:

  • No Rust toolchain on this reviewer host (rustc, cargo, rustup are absent from PATH), so cargo test -p ripr --lib -- top_limitation_parity a_missing_stale_or_unknown and cargo xtask precommit were not executed locally; the analysis above is a source-level reading of the head and base blobs.
  • Hosted proof at this exact head, grouped by workflow run. Run 41244099332 (21:32:53) has Ripr Rust Small on GitHub Hosted / Rust gates COMPLETED/SUCCESS, Admit PR Candidate SUCCESS, Route Ripr Rust Small SUCCESS; run 41244099190 has Rust-only feature lane SUCCESS; run 41244099278 has windows-advisory-subset SUCCESS. Test shards 2, 3 and 4 of 4 are SUCCESS. Shard 1 of 4 is FAILURE, and with it Rust test shards verify and Ripr Rust Small Result.
  • That failure is a base condition, not attributable to this candidate, and I read the failing log rather than inferring it. The shard's only failing test is analysis::language::python::guard_activation::tests::compare_literal_values_fails_open_on_undecoded_literals, panicking at crates/ripr/src/analysis/language/python/guard_activation.rs:1436:9 ("test result: FAILED. 0 passed; 1 failed; ... 16828 filtered out"). This pull request changes only crates/ripr/src/lsp/hover.rs and crates/ripr/src/mcp/workspace.rs, and touches no Python analyzer code. The base fa621a32 is red on the same lane -- its rust-tests-junit run 41243698892 is COMPLETED/FAILURE and its Rust tests shard 1 of 4 in run 41243698941 is FAILURE -- so the red predates the candidate and is the main-red that the open pull request #11918 addresses.
  • The head is nonetheless not a fully green hosted check set, because a required shard and the aggregate result are red. That is why this disposition is REVIEW_INCOMPLETE rather than REVIEW_READY: every lane that observes the candidate's own contribution is green, and the remaining red clears when the base-red clears, but the check set is not green while that shard fails.

Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head c86287d651335314d0e59666a0b0a0fb1a9eb354. Not an approval.

@EffortlessSteven
EffortlessSteven merged commit 2a43182 into main Nov 1, 2026
61 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/11821-limitation-failure-states branch November 1, 2026 05:40
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