Repository navigation
feat(mcp): migrate to split SDK v2 - #100
Merged
Merged
Conversation
ElbertePlinio
added a commit
that referenced
this pull request
Sep 5, 2026
CI run 33940159039 attempt 1 failed the built MCP browser lifecycle in `session_create`. The test parsed the tool payload with a Zod schema, so the report was a bare "expected true" and the server's own error string was discarded. Root cause: `waitForDevToolsPort` aborts its readiness probe on a timeout, which resets the loopback connection. The fake Chrome served `/json/version` from a `net` server with no socket `error` listener, so the reset raised an unhandled 'error' event and killed the process. The next poll saw a published port with a dead process and reported "Chrome exited during startup" — a real failure caused by the probe itself. The probe budget was the 100 ms poll interval, which a loaded four-core runner exceeds routinely, which is why this only showed up in CI. - give the readiness probe a one-second budget, clamped by the time the wait has left, so a live-but-slow endpoint is not reset on every poll - let the fake Chrome survive a client that hangs up mid-response, as a real Chrome does - report the MCP payload, `isError`, and server stderr from the built lifecycle test instead of a schema-only failure Reproduced at 8/72 concurrent lifecycles under two-core contention before the fix and 0/256 after, plus the full suite on two and four cores. The new devtools regression fails with `exited` without the fake fix. Refs #100
CI run 33940159039 attempt 1 failed the built MCP browser lifecycle in `session_create`. The test parsed the tool payload with a Zod schema, so the report was a bare "expected true" and the server's own error string was discarded. Root cause: `waitForDevToolsPort` aborts its readiness probe on a timeout, which resets the loopback connection. The fake Chrome served `/json/version` from a `net` server with no socket `error` listener, so the reset raised an unhandled 'error' event and killed the process. The next poll saw a published port with a dead process and reported "Chrome exited during startup" — a real failure caused by the probe itself. The probe budget was the 100 ms poll interval, which a loaded four-core runner exceeds routinely, which is why this only showed up in CI. - give the readiness probe a one-second budget, clamped by the time the wait has left, so a live-but-slow endpoint is not reset on every poll - let the fake Chrome survive a client that hangs up mid-response, as a real Chrome does - report the MCP payload, `isError`, and server stderr from the built lifecycle test instead of a schema-only failure Reproduced at 8/72 concurrent lifecycles under two-core contention before the fix and 0/256 after, plus the full suite on two and four cores. The new devtools regression fails with `exited` without the fake fix. Refs #100
ElbertePlinio
force-pushed
the
feat/mcp-v2-current
branch
from
September 5, 2026 03:53
596414e to
96ffb1b
Compare
This was referenced Sep 5, 2026
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.
Summary
2026-07-28SIGINT,SIGTERM, andSIGHUPshutdownorigin/mainatfc170ea(ci: gate releases on executed candidate artifacts #99)docs/releases/UNRELEASED.mdentryReview follow-up
SIGHUPReal model-driven client evidence
Exact tested and pushed head:
7689273d4b4d856ab337141739e23a0778980ea9. The client evidence below was produced at4b48f0f; no MCP server, transport, tool, prompt, or resource source has changed since.Each installed client used an isolated home/config/state root, isolated project directory, isolated
PICKFORGE_HOME, and the final built server. Each model actually selected and invokedartifact_list; these were not server-list checks, handcrafted MCP requests, or relay replays.claude-opus-5)2025-11-25mcp__pickforge__artifact_listwith{};ok: true, 0 isolated runsgpt-6-astra)2025-06-18pickforge/artifact_listwith{};ok: true, 0 isolated runsopenai-codex/gpt-5.4-mini)2025-11-25mcpproxy call forpickforge/artifact_list;ok: true, 0 isolated runsThe credential-free configs allow only the harmless evidence call: Claude permissions allow only
artifact_list; Codex usesenabled_tools = ["artifact_list"]plus documented per-tool approval in a read-only sandbox; Pi disables built-in tools and filters Pickforge toartifact_list.Authentication is coupled to each client's config root, so the ephemeral roots used auth-file symlinks to the already-installed credential stores. No credential was copied, printed, recorded, or placed in the evidence tree, and the symlinks were removed immediately after the runs. Normal client configs were not loaded or modified. Metadata-only wire logs record
initialize,tools/list, andtools/call artifact_listfor every client.The evidence packet is at
~/Projects/Boards/pickforge/0.4-release/mcp-v2/REPORT.md. New proof files are*-model-call.txt,*-model-wire.jsonl, and credential-free*-model-*configs.CI attempt-1 failure: root-caused and fixed
Run 33940159039 attempt 1 failed
packages/cli/test/browser-session.test.ts > built MCP browser lifecycle. It was a real defect, not a transient.The test parsed
session_createwith a Zod schema, so CI printed only "expected true" and dropped the payload. The discarded error wasChrome exited during startup ... Unhandled 'error' event ... ECONNRESET.Root cause:
waitForDevToolsPortaborts its readiness probe when the budget expires, and an abortedfetchresets the loopback DevTools connection. The budget was the 100 ms poll interval, which a loaded four-core runner exceeds routinely, and the fake Chrome served/json/versionfrom anetserver with no socketerrorlistener, so the reset killed it. The next poll then correctly reported a published port with a dead process — a failure the probe itself caused.isError, and server stderr from the built lifecycle test instead of a schema-only failurepackages/browser/test/devtools.test.tsthat fails, naming the unhandled'error'event, with only the fake's socket listener reverted96 concurrent built-MCP lifecycles per condition on two cores: attempt-1 code 79/96 with every failure matching the CI signature, fake fix only 96/96, probe-budget fix only 96/96, this head 96/96. Display reservation, containment, MCP v2 transport timing, and teardown were all cleared: the failing call returned a well-formed MCP error over a healthy transport and left no Xvfb, Chrome, or X artifact behind.
Exact-head validation
bun install --frozen-lockfilebun run typecheckbun run lintPICKFORGE_REQUIRE_BROWSER=1 PICKFORGE_CHROME_NO_SANDBOX=1 bun run testPICKFORGE_REQUIRE_BROWSER=1 PICKFORGE_CHROME_NO_SANDBOX=1 bun run test:coveragebun run buildcargo fmt --checkcargo clippy --workspace --all-targets --locked -- -D warningscargo test --workspace --locked: 86 passedcomplexity-gate check --changedbun auditreports only the known dev-only low-severity esbuild advisory tracked in #60.Closes #94
Refs #89