refactor(dev): remove the unreported MCP protocolEra field - #836
ScriptedAlchemy wants to merge 3 commits into
Conversation
🦋 Changeset detectedLatest commit: 831ac0e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
|
Closing. The premise was wrong. |
Summary
Remove the
protocolErafield from runtime MCP connection state. The MCP client (@modelcontextprotocol/client2.0.0) has nogetProtocolEramethod, soclient.getProtocolEra?.()always producedundefinedand the'legacy'branch was unreachable. Only test fixtures and thersc-agent-runtimeexample stamped'modern'.That dead field also hid a real gate failure.
McpAppRuntimePreviewServicerefused any stable session whoseprotocolErawasundefined, so a session opened through the real client could never satisfy it. The gate now checks the fields a client actually negotiates: capabilities, protocol version, and server identity.Removal matrix
DevRuntimeMcpConnectionState.protocolEra(agent-bundle/api)rsc-agent-runtimeexample sessionMcpClient.getProtocolEra,McpSessionConnectionState.protocolEraprotocolEravalidatorsruntimeEraand three'legacy' | 'modern'checksFixtures in 17 test files drop the field. Strict key checks in the Workbench route and App clients now reject a connection that still carries it.
Verification
On this branch merged with
origin/main(f1db114528):pnpm build: passpnpm typecheck: passpnpm lint: passpnpm test:unit: pass (311 files, 4,494 tests)pnpm test:integration:run: pass (104 files, 1,187 tests; whole pool because a public type changed)pnpm docs:site:build: pass (0 broken links across 30,549 anchors, language parity OK)Part of the legacy-API removal sweep. Does not overlap #810's files.