Skip to content

workers/mcp: account connect — no-redirect exchange test, truthful message after a 200 - #19

Open
euphyra-dev wants to merge 1 commit into
mainfrom
workers/mcp-agent-connect-followup
Open

euphyra-dev wants to merge 1 commit into
mainfrom
workers/mcp-agent-connect-followup

Conversation

@euphyra-dev

@euphyra-dev euphyra-dev commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #18, from its review:

  • The exchange never follows a redirect. A test now pins redirect: "manual" on the server-to-server exchange. If the API ever answered with a 3xx, the Worker must not re-send its dedicated secret to another host. Without this test, removing the option went unnoticed.
  • A truthful message after a successful exchange. Once the API has answered 200, it has created the agent key. If something then fails (unreadable body, or no mcp:read in the final scopes), the page now says « La connexion n'a pas abouti. Relancez-la depuis votre agent. ». It no longer claims that no key was created. Every failure before the exchange keeps the full sentence.
  • A comment corrected: the name is shortened to the API's 200-character limit, and the page shows at most 60.

Tests: npm test gives 34 passed (2 new); tsc --noEmit is clean.

Mutants, each reverted afterwards. Both are caught:

  • removing redirect: "manual";
  • restoring the old message after a 200.

The Worker should not be deployed without this change.

… message after a 200

A test pins redirect: "manual" on the exchange, so a 3xx from the API never makes the Worker
re-send its dedicated secret to another host. After an exchange the API answered with 200, the
key exists: the restart page no longer says that no key was created.
@euphyra-dev
euphyra-dev force-pushed the workers/mcp-agent-connect-followup branch from 70212ed to 0fb623f Compare November 27, 2026 09:24

This branch has not been deployed

No deployments
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