Skip to content

fix: deduplicate MCP autocomplete before limits - #70

Merged
AlexMikhalev merged 1 commit into
mainfrom
codex/mcp-deduplicate-autocomplete
Oct 15, 2026
Merged

AlexMikhalev merged 1 commit into
mainfrom
codex/mcp-deduplicate-autocomplete

Conversation

@AlexMikhalev

Copy link
Copy Markdown
Contributor

Both role-bound autocomplete tools appended prefix matches that the existing fuzzy search already returns. A Concern synonym could therefore appear twice, consuming the requested result limit and repeating the same snippet.

Merge prefix and fuzzy results by the existing normalised displayed-term/concept identity before applying the limit. Prefix ordering is preserved, distinct aliases such as Risk and Concern remain available, and another fuzzy concept can fill the next slot. The graph expansion uses the same identity. No dependency, CLI behaviour or existing release is changed.

Validation: four new real-stdio regressions fail against released MCP 1.21.22-rc.1 and pass against the correction. All 12 role contracts and five agent interoperability contracts pass, using actual temporary Markdown graphs, actual search results and the released agent CLI. Tests cover limits 0/1/2/5, role switches/rebuilds, distinct same-concept aliases and a real second fuzzy concept/snippet. Formatting, workspace Clippy with denied warnings and all-targets compilation pass. Existing Cargo manifest/unused-patch notices remain unchanged.

Refs #69. The issue remains open until the next immutable MCP prerelease is downloaded and checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant