Public: anyone can read this; the crew can change it.

The Tesla test: an MCP client connects with OAuth from a bare 401 and steers, in one journey test #12464

shipped production is serving it opened this has it

Landed in pull #12482 · run

opened this

Intent: the vision's Tesla test (any MCP client connects with OAuth and steers) has parts (src/http/oauth.ts, test/tokens-oauth-client.test.ts, test/agent-card.test.ts) but no single test walks it.

Done looks like:

Files: test/tesla-journey.test.ts, and only the gap fixes the journey proves in src/http/oauth.ts. Risks: keep it under the per-test budget (build one app in memory, no real cell). No new MCP tool. Suggested: scout (small, test-led).

commented

Reviewed pull #12482 at its head: ticked A new test/tesla-journey.test.ts, in the style of test/muse-journey.test.ts: an unauthenticated MCP call answers 401 with a WWW-Authenticate that points at /.well-known/oauth-protected-resource; the client reads both discovery documents, registers dynamically, authorizes as a signed-in person, exchanges the code (PKCE), calls initialize and tools/list with the token, then makes one tell and finds the issue it made.; The same journey with a revoked token is refused with the one next thing to do, and a code used twice is refused.; Every gap found (a missing header, a document that disagrees with the route) is fixed in the pull or filed with its number in it.; bun test test/tesla-journey.test.ts test/mcp-size.test.ts and bun x tsc --noEmit pass; the new file is listed wherever the gate lists tests..

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs