Skip to content

fix(mcp): align served gap file paths with canonical IDs (#15645) - #15655

Merged
EffortlessSteven merged 4 commits into
mainfrom
fix/15645-mcp-gap-file-spelling
Nov 21, 2026
Merged

EffortlessSteven merged 4 commits into
mainfrom
fix/15645-mcp-gap-file-spelling

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Serve matched finding paths as src/lib.rs in both ripr_list_gaps and ripr_get_gap. Both list filter spellings still work, and per-file diagnostic budgets keep their existing keys.
  • Preserve the canonical gap ID and the shared renderer's root matching, stable fallback, and Windows verbatim-drive behavior. Check JSON, context, human output, and LSP still use the original rendering.
  • Update the existing projection tests, MCP interoperability docs, and changelog fragment.

Swarm / Source Boundary

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge, dependency, or repo-ops development for ripr-swarm

Source-of-truth Links

Proposal: none
Spec: RIPR-SPEC-0211
ADR: none
Plan item: none
Governing issue or accepted claim: #15645
Acceptance delta (one sentence): MCP list and detail use the bare workspace-relative spelling for a matched finding while keeping the original path fallback and canonical identity.

Candidate Relationships

Candidate branch (GitHub PR head is authoritative after publication): fix/15645-mcp-gap-file-spelling
Stack parent or prerequisite PR (if any): none
Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): none
Accepted winner and losing candidate disposition (when decided): selected candidate for #15645. Draft #15668 also addresses the issue. Its unconditional prefix stripping changes fallback inputs such as ./../outside.rs, and its new item key changes per-file diagnostic budgeting.

Scope

One MCP output behavior. Related #15456 changes shared repair readiness in the same module and does not change either gap file projection.

Proof

  • Isolated Rust 1.95 test compiled the original and candidate path rendering code and the literal production mapping expressions from the list and detail projections, with the real list filter matcher.
  • At base b1dd0b51a8bf9b4aed894b605df514886e6a1161, the ordinary absolute-root list case, prefixed relative detail case, and simulated verbatim Windows case returned ./src/lib.rs and failed the new assertions. The bare path/filter and fallback controls passed.
  • Candidate 741591e024f2aab50c09d637fea55438bfb111c7 passed all six cases, including the existing diagnostic budget key for absolute and already-bare relative file inputs. Both positive filter spellings matched and partial/unrelated selectors did not. Sibling files, relative escapes, and Windows drive/UNC fallback kept their stable spelling. The legacy display still emitted ./src/lib.rs.
  • The affected files have the same base blobs at the observed newer main 6ba8360a77a6b6bece70c605fb1465ca6b29a03d. The Cargo and stdio suites and native Windows were outside this isolated check.

Continuation

The candidate is 3b441f2502cb580909d3bca920413c918c18f821. The implementation, MCP projection tests and filtering controls are unchanged since c2e6e0aab4b86e4d6d8092abe06c902b1a9144a7. The latest commit corrects the specification and traceability mapping. Both the budget finding and the traceability finding have been addressed.

The existing Linux MCP server reproduced the issue over stdio on a real committed Rust boundary change. Both tools served ./src/lib.rs for gap:rust:src/lib.rs:discounted_total:predicate_boundary:predicate:amount==discount_threshold. On the candidate binary the same wire sequence returned src/lib.rs from both tools for that exact canonical ID. All 364 default-feature MCP library tests passed. The default-feature stdio suite passed 55 of 56 tests. The remaining status_reports_the_missing_git_work_tree_precondition stopped before server startup because the managed sandbox provides an existing /tmp/.git directory. The source, format and control review is recorded on this head. Protected qualification admitted this head.

Rollback: revert the eventual squash. No migration is needed.

@coderabbitai

coderabbitai Bot commented Nov 20, 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 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 147 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: 9dcdb86e-11c3-4d11-a5ca-5253ac3ddb7e
Commits

Reviewing files that changed from the base of the PR and between 6ba8360 and 3b441f2.

Files selected for processing: 6

  • .ripr/traceability.toml
  • changelog.d/15645-mcp-gap-file-spelling.md
  • crates/ripr/src/analysis/mod.rs
  • crates/ripr/src/mcp/gaps.rs
  • docs/interop/mcp.md
  • docs/specs/RIPR-SPEC-0211-mcp-workspace-session-evidence.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

REPAIR_REQUIRED for this draft head. Followed both changed fields through list and detail serving, file selection, and the shared diagnostic budget. The wire proof is sound. One internal consumer needs the legacy spelling so this stays a wire-only change.

Comment thread crates/ripr/src/mcp/gaps.rs Resolved

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates MCP gap lists and details reports to output workspace-relative file paths without the leading ./ prefix, matching the path in the canonical gap ID. This is achieved by refactoring the path rendering logic in crates/ripr/src/analysis/mod.rs to support a customizable prefix, introducing finding_location_text_bare, and updating the MCP gap implementation, tests, and documentation accordingly. There are no review comments, so I have no feedback to provide.

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

REVIEW_INCOMPLETE for protected qualification at 741591e024f2aab50c09d637fea55438bfb111c7. Inline source review is complete for issue #15645. GitHub reported the draft mergeable against main 6ba8360a77a6b6bece70c605fb1465ca6b29a03d.

  • Both public mappings use the bare renderer. The only branch affected is a successful nonempty root strip with no parent component. The unchanged fallback retains Windows drive and UNC behavior and out-of-root spelling.
  • The repaired head keeps the original per-document budget key and filter input. The updated projection tests bind the old budget key, both public path values, and the canonical IDs for the same fixture. The canonical ID producer and filter matcher are unchanged. Evidence bytes and digests still derive from the serialized payload.
  • Six isolated Rust cases passed on this head. The original list, detail, and simulated Windows positives failed on the base with the expected leading prefix.
  • Repository Cargo projection tests, raw stdio, native Windows and hosted qualification are pending. CodeRabbit reported quota exhaustion. The other advisory review supplied no actionable finding. The inline budget finding was repaired and resolved on this candidate.

@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 exact-head source review passed. The MCP list and detail now share the bare root-relative spelling while the existing filter and diagnostic-budget key use the original path projection. Related test and fix-site rendering and out-of-root fallback remain unchanged. Native Windows and hosted tests are still unverified.

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

SOURCE_REVIEW_READY on c2e6e0aab4b86e4d6d8092abe06c902b1a9144a7 for #15645. The only change after the independent pass is the test signature's formatting. Both exact-head Rust files pass pinned rustfmt. The six isolated Rust checks still cover the same executable mapping and the previous budget key, and all 11 fields of the current published body pass the repository validator functions. The prior budget thread is resolved.

GitHub's actual merge ref 5c6ec5c66b5122626943f3c41d1d8e627c21df2e (tree 7888b7e30c3ac21e9e4d44db0ec67b41790726a4) includes current main 6ba8360a77a6b6bece70c605fb1465ca6b29a03d and this head. The composed diff is the same four candidate files. Full projection tests and hosted qualification are pending. There is no native Windows result. Proceed to normal Ready, with the label request held until Rust capacity is confirmed and the current head and subject are rechecked.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 20, 2026 11:41

@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 exact-head source rereview passed. The successor only formats one test signature, so the previously reviewed list/detail spelling and diagnostic-budget key separation are unchanged. No hosted or native Windows qualification implied.

@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 found 1 potential issue.

Devin Review

Comment thread crates/ripr/src/mcp/gaps.rs Resolved
@EffortlessSteven
EffortlessSteven marked this pull request as draft November 20, 2026 13:38

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

SOURCE_REVIEW_READY

Reviewed 3b441f2 against #15645. Both wire fields select the bare renderer only for a matched root. The fallback returns the same stable native path, including a relative escape beginning with ./, and per-document budgets retain the original key. Canonical ID, other renderers and admission hints are untouched. The specification and test mapping now agree with the projections. Both review conversations are resolved.

The previous server reproduced the mismatch over stdio on a real canonical ID. Cargo ran all 364 default-feature MCP library tests successfully on the candidate source. Six isolated renderer comparisons covered matched roots, sibling paths, relative escapes and the existing display spelling. Rust 1.95 formatting and traceability symbol lookup passed.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 20, 2026 13:47
@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_READY

Reviewed head 3b441f2502cb580909d3bca920413c918c18f821. PR qualification completed successfully, including both test shards, shard verification, Rust gates and the required Result. Both review threads are resolved. The candidate composes cleanly with d012fd5c3a3816c133fc7d0f19273894e0c41652. Spec format, traceability, changelog fragments and local-context checks passed locally. Real MCP stdio returned the canonical path in both locations. Proceeding to the native merge queue.

@EffortlessSteven
EffortlessSteven added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 5c1de04 Nov 21, 2026
19 checks passed
@EffortlessSteven
EffortlessSteven deleted the fix/15645-mcp-gap-file-spelling branch November 21, 2026 09:38
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.

1 participant