[PR #4648] [CLOSED] fix(mcp): retain same-address procedure aliases in completion #6341

Closed
opened 2026-10-31 01:13:43 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4648
Author: @Shreyansh1729
Created: 10/17/2026
Status: ❌ Closed

Base: main ← Head: contrib/procedure-alias-completion


📝 Commits (1)

  • 5b019e1 fix(mcp): retain same-address procedure aliases in completion

📊 Changes

2 files changed (+63 additions, -13 deletions)

View changed files

📝 src/server/promptCompletion.ts (+11 -13)
📝 tests/boundary/mcp/promptMcp.test.ts (+52 -0)

📄 Description

Summary

Fixes #4623.

Procedure completion discarded all but the first row at each address before checking name uniqueness. It lost valid aliases and could suggest a name that actually identifies multiple addresses. Build address and name inventories from every row, then offer only names associated with one address.

Change and scope

MCP prompt completion owns candidate derivation. Provider inventories and Evidence remain untouched; address deduplication, sorting, prefix matching, result counts and the MCP page limit retain their existing owners.

Routine correction within existing contribution boundaries; a new maintainer scope decision is not applicable. No new provider or target execution capability is introduced.

Evidence and regression coverage

Added production MCP requests over in-memory SDK transport in both row orders. They verify the unchanged tool inventory result, both aliases, duplicate-row deduplication, case-insensitive prefix matching, and exclusion of a name at two addresses. Both row-order regressions failed against the base implementation.

Validation performed

Rebased onto current main 150e996a86f2bec4982ba87f37bf502a8d5e8214.

  • npm run check — passed on the combined final working tree: typecheck, lint, formatting, unused-code detection, metadata, module boundaries and architecture guards.
  • npm run test:focused -- tests/boundary/cli/fridaCli.test.ts tests/boundary/mcp/fridaMcp.test.ts tests/boundary/mcp/promptMcp.test.ts tests/boundary/mcp/promptCompletion.test.ts tests/boundary/filesystem/ompClientConfiguration.test.ts — 40 tests passed across five files after rebasing.
  • npm run docs:check — passed after rebasing, including 5 README consistency tests.
  • npm run verify:test-discovery — all 1,460 test files discovered exactly once on the original working tree; no test files were added or moved.

The independent branches touch disjoint files. Checks above ran against their combined final contents using Node v24.18.0 and npm 11.16.0 on macOS arm64.

Compatibility and remaining coverage

No real analysis engine was started. The reproduction uses the supported fixed-provider embedding seam; it does not establish that built-in engines emit same-address aliases. No performance claim or benchmark is made.

No package version, generated catalog, dependency, or installation changes.

Author readiness

Human owner: @Shreyansh1729

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/4648 **Author:** [@Shreyansh1729](https://github.com/Shreyansh1729) **Created:** 10/17/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `contrib/procedure-alias-completion` --- ### 📝 Commits (1) - [`5b019e1`](https://github.com/morluto/rea/commit/5b019e1179dce76f432c0f5700161de5727b8a96) fix(mcp): retain same-address procedure aliases in completion ### 📊 Changes **2 files changed** (+63 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `src/server/promptCompletion.ts` (+11 -13) 📝 `tests/boundary/mcp/promptMcp.test.ts` (+52 -0) </details> ### 📄 Description ## Summary Fixes #4623. Procedure completion discarded all but the first row at each address before checking name uniqueness. It lost valid aliases and could suggest a name that actually identifies multiple addresses. Build address and name inventories from every row, then offer only names associated with one address. ## Change and scope MCP prompt completion owns candidate derivation. Provider inventories and Evidence remain untouched; address deduplication, sorting, prefix matching, result counts and the MCP page limit retain their existing owners. Routine correction within existing contribution boundaries; a new maintainer scope decision is not applicable. No new provider or target execution capability is introduced. ## Evidence and regression coverage Added production MCP requests over in-memory SDK transport in both row orders. They verify the unchanged tool inventory result, both aliases, duplicate-row deduplication, case-insensitive prefix matching, and exclusion of a name at two addresses. Both row-order regressions failed against the base implementation. ## Validation performed Rebased onto current main `150e996a86f2bec4982ba87f37bf502a8d5e8214`. - `npm run check` — passed on the combined final working tree: typecheck, lint, formatting, unused-code detection, metadata, module boundaries and architecture guards. - `npm run test:focused -- tests/boundary/cli/fridaCli.test.ts tests/boundary/mcp/fridaMcp.test.ts tests/boundary/mcp/promptMcp.test.ts tests/boundary/mcp/promptCompletion.test.ts tests/boundary/filesystem/ompClientConfiguration.test.ts` — 40 tests passed across five files after rebasing. - `npm run docs:check` — passed after rebasing, including 5 README consistency tests. - `npm run verify:test-discovery` — all 1,460 test files discovered exactly once on the original working tree; no test files were added or moved. The independent branches touch disjoint files. Checks above ran against their combined final contents using Node v24.18.0 and npm 11.16.0 on macOS arm64. ## Compatibility and remaining coverage No real analysis engine was started. The reproduction uses the supported fixed-provider embedding seam; it does not establish that built-in engines emit same-address aliases. No performance claim or benchmark is made. No package version, generated catalog, dependency, or installation changes. ## Author readiness Human owner: @Shreyansh1729 - [ ] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [ ] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [ ] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:13:43 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6341
No description provided.