Skip to content

fix(mcp): weak finding naming its missing discriminator is repair-ready (#8717) - #9200

Merged
EffortlessSteven merged 3 commits into
mainfrom
claude/mcp-readiness-weak-discriminator
Oct 21, 2026
Merged

EffortlessSteven merged 3 commits into
mainfrom
claude/mcp-readiness-weak-discriminator

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Governing issue or accepted claim: #8717 (partial: gate 2 only; #8717 stays open for gate 3)

Acceptance delta (one sentence): MCP finding-level readiness gate 2 now treats a producer-named missing discriminator on a weakly_exposed finding as the repair target instead of refusing it, while the fix-site gate and the shared ripr repair seam validator remain the only deciders.

What changed

  • RepairReadiness::from_finding (crates/ripr/src/mcp/gaps.rs): a named missing discriminator refuses as missing_discriminator only on non-weak classes. A weak finding still needs a populated canonical gap (else discriminator_not_populated_for_language / static_limitation) and a fix site (fix_site_not_established / fix_site_not_test_surface).
  • The readiness.evaluation_basis wire string now states that a named missing discriminator is accepted only on a weakly exposed finding.

Not implemented: gate 3

Accepting a weak related test as the fix site (the issue's gate-3 proposal) is NOT implemented here. Gate 3 still requires a strong, high-confidence directly-related test. On the issue's fixture the related test is already strong/high (assert!(is_adult(30))), so gate 3 was not blocking and there was no reproduction to justify relaxing it. #8717 stays open for that part.

Exposed is not refused at the finding level: #9105's shared seam verdict already refuses seams ripr repair refuses, and B4/DISCOUNT/FEE exposed-class items the CLI admits stay ready.

Reproduction (binary from main fbb78fd)

Fixture: is_adult > 18 -> >= 18, weak test assert!(is_adult(30)). Both weak gaps repair_packet_ready: false, missing_discriminator. After the fix the predicate_boundary item is ready with an awaiting_edit attempt and fix site tests/adult.rs; the sibling return_value item stays refused (seam_gate_refused, the same refusal ripr repair gives).

Proof

  • Unit (mcp::gaps, mcp::repair): weak+named ready; every non-weak class, weak without gap, weak without fix site stay refused.
  • Real stdio weak_boundary_naming_its_discriminator_is_repair_ready_only_where_the_cli_admits: MCP ready exactly where ripr repair admits; the refused item has a typed seam reason and no attempt.
  • agentic_bench_mcp B4b updated: the unpinned boundary now binds a packet.
  • Ran: cargo fmt --all --check, cargo test -p ripr --lib mcp:: (176 pass), --test mcp_stdio (24 pass), --test agentic_bench_mcp (15 pass). cargo xtask precommit not run.
  • RIPR-SPEC-0214 and changelog.d/8717-mcp-weak-discriminator-readiness.md updated.

🤖 Generated with Claude Code

https://claude.ai/code/session_019ZHDKLVQqArSZrUFKSkREo

… target (#8717)

Gate 2 of RepairReadiness::from_finding no longer refuses a weakly_exposed
finding for naming its missing discriminator; other classes keep the typed
refusal, and the fix-site gate plus shared seam validator still decide.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ZHDKLVQqArSZrUFKSkREo
@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 21, 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 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 86 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
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: ef223cd3-ba19-4ba8-9b1c-913a6539ddae
📥 Commits

Reviewing files that changed from the base of the PR and between 601b3a4 and 48c533d.

📒 Files selected for processing: 7
  • .ripr/traceability.toml
  • changelog.d/8717-mcp-weak-discriminator-readiness.md
  • crates/ripr/src/mcp/gaps.rs
  • crates/ripr/src/mcp/repair.rs
  • crates/ripr/tests/agentic_bench_mcp.rs
  • crates/ripr/tests/mcp_stdio.rs
  • docs/specs/RIPR-SPEC-0214-mcp-repair-transaction-projection.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

…inator readiness (#8717)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ZHDKLVQqArSZrUFKSkREo
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 21, 2026 15:50
@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!

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Copy link
Copy Markdown
Member Author

Ripr Rust Small Result is red on this head from check-process-policy: crates/ripr/src/workspace_status.rs contains Command::new 1 time(s), allowed 0. That is the test-only mkfifo call merged in #9075, red on main too and not in this PR's files. Main branch health owns the allowlist fix; no fix has landed yet. I'll merge main in and re-label once it does.


Generated by Claude Code

@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 repair.rs test was renamed to scope it to a non-weak class (ReachableUnrevealed), and adds a clarifying comment, but no assertion inside the renamed test was strengthened; the weak-pass branch relies entirely on the new mcp::gaps tests for behavior coverage.
  • Confirm real-stdio control wires MCP repair_packet_ready and prepare_repair.attempt.state to the actual ripr repair CLI verdict (cli_repair_refusal) per finding_id, so the fixture is a two-sided invariant, not a single-shot readiness assertion.
  • Confirm gate 3 (related-test grip) is asserted unchanged with the inline claim that the fixture's related test is already strong/high; the change relocates the typed refusal but does not re-prove gate 3 ordering on a weakly exposed repair target. A negative case asserting weak+named with a weak-only related test still ends at gate 3 (fix_site_not_test_surface) would harden the spec's gate-order statement.
  • Confirm no sibling public-API path or route beyond RepairReadiness::from_finding was changed in this diff. The widened branch is local to finding-level gate 2; the disclaimed scope (gate 3 and shared seam validator) is genuinely conjoined and the doc/spec update confirms the fail-closed conjunction. No re-introduction of an over-claim observed at the source-route level.

Refuted

  • Renaming the test in mcp::repair could let the old failure slip through because the suffix changed but the assertion is identical.; refuted because: Comparison is the same produce-named missing discriminator with the canonical gap dropped; class flipped to ReachableUnrevealed, which strengthens the guard (covers every non-weak case via the WeaklyExposed complement). Not a regression.
  • The change removes discriminator readiness protection broadly.; refuted because: It exempts only WeaklyExposed findings and retains the canonical-gap, fix-site, and downstream shared seam-validator gates.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.
  • The claimed Rust test proof has not yet been independently confirmed in the supplied packet; cargo-test is scheduled late, while ripr failed with exit code 2.

@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 one verification check before upstream.

Verification questions

  • Confirm gate 3 ordering is not explicitly regression-tested for the newly admitted weak+named discriminator shape.

Refuted

  • The widened branch misclassifies a weak named-missing finding that lacks a canonical gap.; refuted because: Unit controls explicitly remove the canonical gap and require discriminator_not_populated_for_language; the implementation still requires a populated gap before proceeding.
  • RepairReadiness::from_finding is the wrong place for a class-conditional gate 2; the seam-level validator should own it.; refuted because: The seam validator's role is 'is the seam actually startable,' not 'is the finding-level discriminator established.' Gate 2 is documented as finding-level; fix-site and seam gates already conjoin downstream. Moving the condition would invert the documented order and require re-proving the spec's gate-order statement.
  • The new stdio test is only a single-sided readiness assertion.; refuted because: It invokes cli_repair_refusal by finding_id for every listed weak item, requires at least one admitted and one refused item, and checks readiness, attempt state, typed ineligibility, and fix site against that verdict.

Parked follow-ups

  • Gate-3 behavior is preserved indirectly rather than asserted with a dedicated weak-only-related-test control.

Evidence gaps

  • The always-on cargo-test proof is scheduled late and no result is yet present in the supplied packet.
  • Model proof intent was rejected by deterministic validation.
  • The review packet provides no completed cargo-test receipt and reports RIPR failure, so runtime proof status cannot be confirmed from supplied evidence.

@EffortlessSteven
EffortlessSteven merged commit 4e84fc6 into main Oct 21, 2026
49 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/mcp-readiness-weak-discriminator branch October 21, 2026 17:35
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