Repository navigation
fix(server): keep remote delegation idempotency namespace durable across restarts - #222
Open
nullStack65 wants to merge 1 commit into
Open
nullStack65 wants to merge 1 commit into
nullStack65 wants to merge 1 commit into
Conversation
Derive the thread MCP requestNamespace from durable threadId instead of the ephemeral per-credential providerSessionId so remote delegation retries after an origin server restart or crash window reconcile with the existing remote thread instead of launching duplicates or stranding lanes. Model: gemini-4-neon Task: fix Agent: antigravity Lane: CLO-1091
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
McpSessionRegistryset each thread credential'srequestNamespaceto its ephemeral in-memoryproviderSessionIdUUID. When the origin T3 server restarted (or rotated credentials), retryingdelegate_taskwith the sameclientRequestIdproduced a new idempotency key:delegated_task.remote.requestrecording could not be recovered by retrying with the sameclientRequestId, stranding the remote thread and lane.Fix
requestNamespacedeterministically from durable thread identity (thread:${threadId}) inMcpSessionRegistrywhile keepingproviderSessionIdand bearer tokens ephemeral per credential.environmentIdandthreadIdwhen looking up a replayed remote task record inRemoteDelegation.McpSessionRegistryinstances across origin restarts covering:taskIdand remote thread),clientRequestIdvalues still launching new remote tasks.Verification
vp run typecheck: 41/41 packages passedvp test run(apps/server/src/mcp/McpSessionRegistry.test.ts,apps/server/src/peer/RemoteDelegation.test.ts): 2 files, 69/69 tests passedvp fmt --check&vp linton touched files: 0 warnings, 0 errorsDeploy: fleet
Model: gemini-4-neon
Task: fix