This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Repository navigation
feat(mcp): capability generation convergence and automatic rebind - #134
Merged
James3014 merged 1 commit intoSep 13, 2026
Merged
Conversation
- Introduce SessionConvergenceState and evaluateSessionConvergence to track session vs runtime generation divergence - Introduce evaluateMultiRoleConvergence to detect multi-service role (7677 dev2 vs 7678 dev-c) deployment drift - Register capability_convergence_status in CUTOVER_SAFE_TOOLS and MCP tool registry - Bind SessionGenerationSnapshot and McpServer reference to active transports in McpSessionRegistry - Detect missing tools in tools/call against stale session snapshots and return structured STALE_MCP_SESSION disposition (-32003) - Provide broadcastToolListChanged on running server to notify listChanged-capable MCP clients - Add comprehensive test coverage in deployment-convergence.test.ts, mcp-sessions.test.ts, and capability-generation-convergence.test.ts Closes #133
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses Issue #133 by resolving the 5-layer capability and generation divergence across:
Changes
src/deployment-convergence.ts: AddedSessionConvergenceState(CURRENT,STALE_SERVER,STALE_CAPABILITY_MANIFEST,STALE_SESSION_CATALOG,RECONNECT_REQUIRED,RECONCILIATION_REQUIRED),SessionGenerationSnapshot,SessionConvergenceEvaluation,evaluateSessionConvergence, andevaluateMultiRoleConvergence.src/mcp-cutover.ts: Added"capability_convergence_status"toCUTOVER_SAFE_TOOLSso that drain / reconcile-only mode does not block convergence queries.src/mcp-sessions.ts:McpSessionRegistrynow records snapshot metadata and server instance references per session (getSnapshot,setSnapshot,getServer,setServer,getAllServers).src/server.ts:capability_convergence_statusMCP tool.SessionGenerationSnapshoton MCP session initialization.tools/call, checks whether missing tools are due to session generation divergence, returning typed error disposition[STALE_MCP_SESSION:<STATE>](code-32003).broadcastToolListChangedtoRunningServerto broadcastnotifications/tools/list_changedto active clients supportinglistChanged.src/deployment-convergence.test.ts,src/mcp-sessions.test.ts, andsrc/capability-generation-convergence.test.ts.Fixes #133.