Skip to content

test: top-limitation parity across MCP, LSP hover and CLI (+ fix MCP reason wording) - #11829

Merged
EffortlessSteven merged 3 commits into
mainfrom
claude/11821-top-limitation-parity
Oct 31, 2026
Merged

EffortlessSteven merged 3 commits into
mainfrom
claude/11821-top-limitation-parity

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Governing issue or accepted claim: #11821
Acceptance delta (one sentence): A parity test fails if the MCP top-limitation result, the LSP hover or the CLI explanation name a different limitation (kind, reason, next step) for the same finding, and the one divergence it found is fixed at the MCP owner.

What the test found

GapItem::limitation_document worded reason with StaticLimitKind::describe(), while the CLI (output/human/sections.rs) and LSP hover (push_preview_boundary) use describe_for_family(&probe.family). For rust_assertion_context_unresolved on a match arm, MCP said assert_eq! while hover and CLI said assert!.

Change

  • mcp/gaps.rs: GapItem stores static_limit_reason, computed with describe_for_family when the item is built, and limitation_document uses it.
  • lsp/hover.rs tests: top_limitation_parity_tests builds one finding per (family, kind) pair and asserts that MCP kind, stage, reason and recovery appear verbatim in the hover (Static limit: kind — reason) and the CLI (kind — reason and Next: equals the MCP recovery). A second test checks that a producer static limit never reads as no_limitation_established.
  • Changelog fragment.

Proof

  • cargo test -p ripr --lib top_limitation_parity: 2 passed with the fix.
  • Discrimination: with the MCP reason reverted to describe() the first test fails on the match-arm case (assert_eq! vs assert!); restored before commit.
  • cargo fmt --check and check-changelog-fragments pass. cargo xtask precommit not run locally (host OOM on full builds); hosted CI is the remaining gate.

Not claimed

  • The VS Code surface is not covered here. It renders the LSP top_limitation DTO (editors/vscode/src/client.ts), and the extension host suite does not run in this environment. test: top-limitation parity across CLI, LSP hover/action, VS Code and MCP #11821's VS Code row stays open.
  • The stale/missing-limitation row (never a stronger route) is covered only as far as the static-limit-versus-none case above; the stale-snapshot refusal path keeps its existing MCP stdio test.
  • No analyzer change, no runtime or mutation claim.

Generated by Claude Code

…he MCP reason per probe family (#11821)

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

Copy link
Copy Markdown
Member Author

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

Angles: semantic owner, divergence direction, oracle discrimination, claim boundary.

  • Owner: wording lives in StaticLimitKind::describe_for_family, already used by CLI and hover. The MCP now calls the same function instead of forking a second wording path. It stores the string at item build time, because GapItem keeps no Finding.
  • Direction: only the match-arm rust_assertion_context_unresolved wording changes (assert_eq! to assert!). No class, route or readiness decision moves, and no stronger claim is introduced.
  • Oracle: the parity test compares MCP output to hover and CLI text for three (family, kind) pairs. It fails with the old describe() call (the match-arm case) and passes with the fix, so it discriminates.
  • Claim boundary: VS Code is not covered, and the PR says so. test: top-limitation parity across CLI, LSP hover/action, VS Code and MCP #11821's VS Code row stays open.

Findings: none blocking. Hosted Ripr Rust Small Result on this head is the remaining gate; I'm checking whether an MCP golden carries the old match-arm wording.


Generated by Claude Code

@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 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 150 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: 7c49361c-1440-4198-b52f-8e1c27094b1a
Commits

Reviewing files that changed from the base of the PR and between 2287778 and 46dd0c2.

Files selected for processing: 3
  • changelog.d/11821-mcp-limitation-reason-family-wording.md
  • crates/ripr/src/lsp/hover.rs
  • crates/ripr/src/mcp/gaps.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Copy link
Copy Markdown
Member Author

The Ripr Rust Small Result failure on f5ba974 was not this PR's: someone merged main into the branch (new head 46dd0c2), so the run's live-eligibility check for the old head failed and the hosted job was cancelled. No test ran. The merge brought in only main's changes, so the earlier review of record still holds for this PR's three files. I re-applied merge-ready to qualify the new head.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Review of record, head 46dd0c221b834c86618151798b171ec97998bc26 (main merged in 19:27Z; author content unchanged). Angles: correctness, tests/oracle, spec/contract, perf/security.

  • Correctness: GapItem now stores static_limit_reason computed with describe_for_family(&probe.family) at construction, and limitation_document uses it (fallback to describe() only when absent). This aligns MCP with the CLI and LSP hover wording and is the single owner for the reason string. It does not change kind, stage, recovery, or any exposure/repair verdict, so the fail-closed actionability flip is untouched.
  • Tests: the parity test builds one finding per (family, kind) pair, including the match-arm RustAssertionContextUnresolved case that diverged, and asserts MCP kind/reason/recovery appear verbatim in hover and CLI. The second test pins that a producer static limit never reads as no_limitation_established. The author documents red on the reverted describe().
  • Contract: JSON field set unchanged, only the reason wording for one family; changelog fragment present. VS Code surface is explicitly not claimed.
  • Perf/security: one string computed per item; none.
  • Findings: none blocking. Compile of the new test-only imports is proven by hosted CI, not locally.
  • Threads: none open.

Disposition COMMENT (author session). Merge only on green Ripr Rust Small Result on this exact head.


Generated by Claude Code

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