fix(mcp): make explore cross-context dedup opt-in - #1624
danusha2345 wants to merge 10 commits into
Conversation
d8e500b to
63992fa
Compare
|
Verified on a real TypeScript repo (Chrome MV3 extension, 582 files, TS/JS/Vue/markdown, Windows 11, tree-sitter wasm walker, kernel off). Branch: this PR merged onto current Merges clean onto main. No index change (identical node/edge counts), as expected for an opt-in flag. PR test files: 26/26 pass. Verified alongside #1621 on the same tree; that one has two Windows-only test failures (details there), this one none. Either fixes the subagent "already sent" case for us; this one does it without installing session hooks into user settings. |
…ext-dedup # Conflicts: # CHANGELOG.md
…ext-dedup # Conflicts: # CHANGELOG.md
|
Merged current |
…ext-dedup # Conflicts: # CHANGELOG.md
|
Merged current |
…ext-dedup # Conflicts: # CHANGELOG.md
|
Merged current |
…ext-dedup # Conflicts: # CHANGELOG.md
|
Merged current |
…ext-dedup # Conflicts: # CHANGELOG.md
|
Merged current |
…ext-dedup # Conflicts: # CHANGELOG.md
|
Merged current |
…ext-dedup # Conflicts: # CHANGELOG.md
|
Merged current |
|
Superseded by Forge landing PR #1788, which cherry-picks this approach (opt-in |
Land the #1624 approach by @danusha2345: re-serve source by default so subagents and compacted contexts never inherit stale already-sent pointers. Keep cross-call dedup available through explicit truthy CODEGRAPH_EXPLORE_DEDUP values for durable contexts. Preserve current Unreleased entries, credit the contribution, and align the MCP server guidance with the safe default. Validation on Linux / Node 22.23.2: - Reproduced default-on failure before the fix; default-off now passes. - Focused explore-cross-call-dedup suite: 26 passed. - TypeScript: npx tsc -p tsconfig.json --noEmit passed. Fixes #1620. (cherry picked from commit 63992fa) Co-authored-by: danusha2345 <ewidusoc498@gmail.com>
Summary
Fixes #1620.
An MCP connection is not a reliable conversation boundary: hosts may reuse it for subagents or keep it alive across context compaction. Suppressing source by default can therefore point an agent at text that its current context never received.
CODEGRAPH_EXPLORE_DEDUP=1style valuesThis is deliberately limited to the correctness fix and does not add installer hooks or host trust state.
Verification
npm run build:kernelnpm run buildnpm test -- --reporter=dot— 194 files, 3231 passed, 10 skipped