From c3f6de539c9cdb284851b8a9332d356653f07ba9 Mon Sep 17 00:00:00 2001 From: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> Date: Tue, 27 Oct 2026 14:38:57 -0700 Subject: [PATCH] test(server): the link-card retry test names a new MCP credential A link card's retry key is scoped to the MCP credential, not the provider session: a replacement session that reuses a valid credential finds the first card, and a retry after a restart or idle release (a new credential) gets a new one. The test and the request docstring now say so. Co-Authored-By: Claude Opus 5.5 --- apps/server/src/peer/PeerLinkRequests.test.ts | 2 +- apps/server/src/peer/PeerLinkRequests.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/server/src/peer/PeerLinkRequests.test.ts b/apps/server/src/peer/PeerLinkRequests.test.ts index b7353beb64992..f59202bb140ae 100644 --- a/apps/server/src/peer/PeerLinkRequests.test.ts +++ b/apps/server/src/peer/PeerLinkRequests.test.ts @@ -567,7 +567,7 @@ it.live("a retry of a pending request returns pending and shows no second card", ), ); -it.live("a later provider session reusing a clientRequestId gets a card of its own", () => +it.live("a new MCP credential reusing a clientRequestId gets a card of its own", () => withBoth((a, b) => Effect.gen(function* () { yield* seedThread(a); diff --git a/apps/server/src/peer/PeerLinkRequests.ts b/apps/server/src/peer/PeerLinkRequests.ts index cdae666138355..15f4877873276 100644 --- a/apps/server/src/peer/PeerLinkRequests.ts +++ b/apps/server/src/peer/PeerLinkRequests.ts @@ -63,7 +63,8 @@ export class PeerLinkRequests extends Context.Service< { /** * Shows a link card in the calling thread and returns at once. A retry - * with the same clientRequestId returns the card's current outcome. + * with the same clientRequestId and MCP credential returns the card's + * current outcome. */ readonly request: ( scope: McpInvocationContext.McpInvocationScope,