Skip to content

chore(release): merge v2/main into main for v2.16.0 - #3006

Merged
cliffhall merged 46 commits into
mainfrom
v2/chore/milestone-merge-v2.16.0
Nov 18, 2026
Merged

cliffhall merged 46 commits into
mainfrom
v2/chore/milestone-merge-v2.16.0

Conversation

@cliffhall

@cliffhall cliffhall commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Closes #3003

Milestone merge of v2/main into main for the v2.16.0 minor release. This is step 2 of the release skill. Step 1 was #2999 / PR #3001.

This is a pure merge

$ git rev-list HEAD --not origin/main origin/v2/main
6381f0e9 chore: merge v2/main into main for the v2.16.0 release (#3003)

$ git rev-parse origin/v2/main^{tree}
f0d288006a1f555a6374acf69d332b7ab0cef300
$ git rev-parse HEAD^{tree}
f0d288006a1f555a6374acf69d332b7ab0cef300

The merge commit's tree is byte-identical to origin/v2/main, and the branch has no commits of its own.

Verification

  • npm run local:gate in a dedicated worktree with a full npm install: green (7m01s).
  • npm run pack:verify: OK. The tarball has 44 files, no source maps, 6.36 MB unpacked. Installed into a clean consumer, its bin drives web (prod build, served dist, plus an MCP App through the shipped sandbox proxy), cli, tui and mcpdo end to end.
  • Hand-driven smoke of every milestone issue from the production build: 15 / 15 pass, 0 regressions, each bug reproduced against the published 2.15.0 where it could be. Ledger for maintainer review: https://claude.ai/artifact/3PTpgwspmJPvXvMg4k55bh

Known issue for the release notes

GHSA-fc5q-39xc-vjpf (picomatch ReDoS) has no patched release; tracked in #3000.

🤖 Generated with Claude Code

cliffhall and others added 30 commits November 12, 2026 00:03
Ajv registers each pattern in the engine-wide scope under rx.toString()
and hands back the first entry for a key, so a LinearPattern declined
because one schema's compile budget ran out was reused by every later
schema on the engine. Give such a decline a unique key; every other
outcome depends only on the pattern and keeps the shared key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
A stepped run keeps its --load-rate figures on each stage rather than the
top level, so the text header never printed the rate. When stepping
concurrency at one fixed rate, read that rate back from the stages.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…#2962)

The detached sign-in helper now classifies a flow failure with
classifyError, where the original error object still exists, and relays
the exit code and envelope fields on its error event. The parent
rebuilds that CliExitCodeError (type-checked, sanitized) so a non-TTY
connect reports e.g. fetch_refused / 12 with its url, as the TTY path
does. auth_required stays the fallback for an unclassified failure.
The EMA login helper shares the same event and gets the same fix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…pen (#2967)

ink-form gives no way to gate its own useInput/useFocus hooks, so a key
typed into a sampling or elicitation overlay also moved focus and edited
values in the tool, resource, prompt or roots form underneath it.
GatedForm runs the form in ink-form's controlled mode with its value held
in a component that stays mounted, and unmounts the Form itself while the
overlay owns the keyboard, so nothing underneath sees a key and the draft
returns intact.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
Servers deployed as several replicas behind a load balancer that routes
by cookie affinity were unusable past initialize: the transports never
stored Set-Cookie, so later requests round-robined onto replicas without
the MCP session and failed with 404 Session not found.

A new cookieJar server setting (default off) gives each Streamable HTTP
or legacy SSE connection an in-memory, same-origin jar that stores
Set-Cookie and replays Cookie. It sits above the fetch tracker so the
Network log shows (redacted) what was sent, never persists, and never
touches requests to other origins. Threaded through settings, disk
persistence, the /api/servers validation, and the server settings form.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…scribe (#2964)

subscriptions-broadcast-http.json sets the new broadcastResourceUpdates
option: every session of the composable server joins one shared hub, and
update_resource publishes through it, so one call updates the resource in
every session and notifies each one subscribed. A --load-subscribe fan-out
run against it delivers every notification instead of reporting all but
the calling session as missed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…2922)

The daemon test harness derives the endpoint from getDaemonSocketPath
instead of a hard-coded <dir>/mcpdod.sock, keys fake-daemon tokens by
directory, passes dir alongside a pipe endpoint, and tears a spawned
daemon down by its token/lock (present on every platform) with an
EBUSY-tolerant rmSync. unixDaemonOnly is gone; the few remaining win32
skips are POSIX-only behaviour (socket files, sun_path, mode bits), each
with its reason at the site. mcpdo's per-file coverage threshold is
enforced on Windows again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…n-budget-cache-key

Key a budget-declined pattern to its own schema
A shell variable is empty in a fresh ! invocation, which would lift
the notice instead of applying it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…2935)

getValidator reused engine.getSchema($id) unconditionally, so a changed
outputSchema that kept its $id, or a second tool declaring the same
$id, was validated against whatever was registered first. Reuse the
lookup only when it is the very schema object passed in; otherwise
remove the registration (by Ajv's normalized key) and compile the new
schema. Each Ajv entry point keeps a compile budget of its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…d-header-rate

Show the target rate in a stepped --load run's text header
A sessionless HTTP POST the transport rejects builds a server that is never
registered as a session nor closed; joined at construction, the hub held it
forever. Nothing can subscribe before initialized and the hub replays the
latest updates on join, so waiting loses nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…stays an own value (#2967)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…se-v1-deprecate-step

Add a v1 npm deprecate step to the release skill
…-id-reuse

Validate against the schema passed in, not the first registered under its $id
…gin (#2936)

fetch follows redirects, so a cross-origin redirect could otherwise plant
another origin's cookies in the jar and replay them to the MCP server.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…elper-exit-classification

mcpdo: keep the sign-in helper's failure classification without a TTY (#2962)
…cast-resource-updates

Add a showcase config that broadcasts resource updates for --load-subscribe
…ing its dir (#2922)

The daemon chdir()s into its directory and exits only once its event loop
drains, after it has already removed its token and lock. Windows refuses
to remove a directory that is a live process's cwd (EBUSY), so teardown
now waits on the pid the daemon reports in ping.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…#2936)

A response rebuilt by a wrapper below the jar (OAuth endpoint overrides,
discovery compat) reports an empty url and has lost its provenance, so it
can no longer be trusted as same-origin. And expired entries no longer
hold capacity that would evict a live affinity cookie.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…orms-under-overlay

TUI: keep the test and roots forms inert under a pending request overlay
The interceptor throws on a 401/403, so a jar above it never saw that
response's Set-Cookie and the OAuth retry carried stale cookies.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…drains (#2922)

A daemon that stopped on its own (idle reap after disconnect, or a test's
daemon stop) has already removed its token, so teardown has no pid to wait
on while the process still has the directory as its cwd. Retry the removal
on EBUSY/EPERM/ENOTEMPTY for a bounded time instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
CodeQL js/request-forgery: the proxy resolved the incoming request URL
against the replica origin, which an absolute URL could override.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
With mcpdo's per-file gate enforced on Windows, the POSIX arms of
paths.ts (socket-file path, sun_path limits, assertTrustedPrivateRoot's
checks) need covering there too. Fake the platform (and stand in getuid
where Windows has none) instead of skipping; the sun_path case now runs
on every host.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
CodeQL still traced the request path into the forwarded URL; the path is
now picked from the fixture's two endpoints and only a validated
sessionId is carried over.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
cliffhall and others added 16 commits November 12, 2026 02:47
…e-jar

Add an opt-in per-server HTTP cookie jar for sticky sessions (#2936)
A closed fake server leaves its published token behind, so stopDaemonIn
waited out its full budget in every fake-server teardown. A daemon
answers ping even while stopping, so an unanswered ping means there is no
shutdown to wait for; a process still draining is removeDaemonDir's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…o-windows-named-pipe-tests

mcpdo: run the daemon test suites on Windows over named pipes
…2973)

when-exit (via atomically) re-raises the first SIGINT/SIGTERM with
process.kill(process.pid, ...). A self-sent signal is handed to whichever
thread the kernel picks, and on a loaded machine that delivery can lag the
in-flight calls settling. withLoadInterrupt then removed its last listener,
restoring the default disposition, and the pending copy killed the CLI by
the signal after the partial summary was printed: exit code null, not 130.

When the run ends without the re-raise having been seen, leave a one-shot
listener that swallows it, added before the run's listeners come off so the
signal never has zero listeners. Its removal is driven by the copy arriving,
not by a timer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…igterm-race

Absorb a re-raised interrupt still in flight when a --load run ends (#2973)
A server could stream `data: ` followed by an endless run of bytes with no
line terminator. Both the SDK's SSE parser (eventsource-parser, reached
through the legacy SSE transport and the Streamable HTTP POST-reply and
standalone GET streams) and the network tracker's stream watcher buffered
that partial line without limit, so the process grew until V8 aborted it.

- Add createSseLineCapFetch: every successful text/event-stream response,
  and every successful GET that asked for one (the Streamable HTTP
  transport parses a 2xx standalone GET as SSE whatever its Content-Type),
  is piped through a transform that errors with SseLineTooLongError once
  more than SSE_MAX_LINE_BYTES (16 MiB) arrive without a CR or LF. The
  error surfaces through the transport's onerror naming the limit, and the
  pipe cancels the upstream body. Applied innermost in createTransportNode,
  over the base fetch and a caller-supplied eventSourceInit.fetch alike.
- The stream watcher now splits lines with a bounded splitter that keeps
  only a line's head (WATCHED_LINE_HEAD_CHARS), which is all it needs to
  classify the line, so its memory no longer grows with line length.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…nguage

The web backend now derives the upstream Accept-Language header from each
message's own params._meta["io.modelcontextprotocol/acceptLanguage"], so a
preference set through the generic Request Metadata editor reaches a
Streamable HTTP server on both carriers, exactly equal as SEP-2792 requires.
The client-supplied per-send header channel stays restricted to Mcp-Param-*;
the language header is never taken from the browser. The mirror overrides a
configured Accept-Language, and a value HTTP cannot carry byte-for-byte is
not mirrored.

Adds a language-preference-http.json showcase server with a
localized_greeting tool that reports the _meta value and header it received,
flags a HeaderMismatch, and returns contentLanguage in result _meta; the
composable server now forwards a handler's isError and result _meta. Covered
by unit tests, real-transport e2e through the remote backend, and fixture
tests, with a demo guide in docs/test-servers.md.

Closes #2979

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
The line cap reset on every CR or LF, so a server could still exhaust
memory with many short, terminated `data:` lines and no blank line: the
SDK's eventsource-parser appends each data line to the pending event and
frees it only when a blank line dispatches the event.

The same transform now also counts bytes since the last blank line (a
terminator ending an empty line; CRLF is one terminator even when split
across chunks, so a split CRLF is never read as a blank line) and errors
past the same 16 MiB limit. SseLineTooLongError gains a `kind`
("line" | "event") and a message naming the line-length or the
event-size limit accordingly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…t-language-meta

feat(web): mirror SEP-2792 _meta acceptLanguage to upstream Accept-Language
createTransportNode now builds a StreamableHTTPClientTransport subclass that
derives Accept-Language from each message's own
params._meta["io.modelcontextprotocol/acceptLanguage"] and passes it through
the SDK's per-send headers option. That transport is shared by the CLI, the
TUI and the web backend, so all three mirror the preference exactly; before
this only the web backend did, and a direct connection sent Node fetch's
default "Accept-Language: *" beside the _meta value, which a strict server
rejects as HeaderMismatch.

The backend-only derivation added in #2979 (upstreamSendHeaders) is removed
in favor of the transport; the backend's per-send header allowlist is back
to Mcp-Param-* alone. Covered by transport unit tests, a CLI e2e case
(verified to fail on the unpatched transport), the updated fixture tests,
and the existing remote e2e tests, which still pass through the transport.

Closes #2987

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…t-accept-language

feat(core): mirror SEP-2792 acceptLanguage on every Streamable HTTP send
…se-line-cap

Cap SSE line and event size on every SDK transport stream (GHSA-3xgv-mvj6-g78r)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
…-2-16-0

Release 2.16.0 step 1: bump version to 2.16.0
@cliffhall cliffhall added the v2 Issues and PRs for v2 label Nov 18, 2026
Copilot AI balanced review requested due to automatic review settings November 18, 2026 07:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

With cookieJar enabled, same-origin OAuth responses can overwrite MCP affinity cookies and route subsequent MCP requests to a replica that does not hold their session.

1 open issue
What changed in this PR

This milestone merge brings the accumulated v2/main changes into main for the 2.16.0 release, following the version preparation in #3001.

Changes:

  • Add HTTP cookie-jar configuration and language-preference mirroring, and fix schema-validation isolation and stream buffering.
  • Improve TUI input isolation, CLI load-run handling, and mcpdo authentication errors; enable Windows daemon coverage.
  • Add broadcast and localization fixtures, regression tests, and updated release procedures.
File Description
test-servers/​src/​test-server-fixtures.ts Adds localized greetings and broadcast resource updates.
test-servers/​src/​resource-update-broadcast.ts Adds a shared cross-session resource-update hub.
test-servers/​src/​resolve-config.ts Creates an optional broadcast hub per configuration.
test-servers/​src/​preset-registry.ts Registers the localized greeting preset.
test-servers/​src/​load-config.ts Adds the broadcast configuration option.
test-servers/​src/​index.ts Exports broadcast helpers.
test-servers/​src/​composable-test-server.ts Wires broadcast lifecycle, request headers, and result metadata.
test-servers/​configs/​subscriptions-broadcast-http.json Adds a subscription fan-out showcase.
test-servers/​configs/​language-preference-http.json Adds a language-preference showcase.
package.json Sets the release version to 2.16.0.
package-lock.json Aligns lockfile version metadata.
docs/​quality-gate.md Documents Windows daemon tests and coverage enforcement.
docs/​mcp-server-configuration.md Documents the cookie-jar setting.
core/​mcp/​types.ts Defines stored and runtime cookie-jar options.
core/​mcp/​serverList.ts Persists cookie-jar settings only when enabled.
core/​mcp/​remote/​node/​server.ts Validates cookie-jar settings and clarifies header derivation.
core/​mcp/​node/​transport.ts Integrates cookie jars, SSE caps, and language mirroring.
core/​mcp/​node/​languageMirroringTransport.ts Mirrors message language metadata into HTTP headers.
core/​mcp/​linearPatternValidator.ts Isolates budget declines and replaces reused schema identifiers.
core/​mcp/​fetchTracking.ts Bounds partial-line buffering during stream tracking.
core/​mcp/​acceptLanguage.ts Derives exactly representable language headers from metadata.
core/​cli/​handlers/​load-format.ts Shows fixed rates for stepped-concurrency runs.
clients/​web/​src/​test/​integration/​mcp/​remote/​transport.test.ts Tests language mirroring through the backend.
clients/​web/​src/​test/​integration/​mcp/​remote/​server-extra-coverage.test.ts Tests cookie-jar validation and persistence.
clients/​web/​src/​test/​integration/​mcp/​localized-greeting-fixture.test.ts Exercises localization and header agreement.
clients/​web/​src/​test/​core/​mcp/​serverList.test.ts Tests cookie-jar configuration round trips.
clients/​web/​src/​test/​core/​mcp/​node/​transportCookieJar.test.ts Tests cookie retention across authentication challenges.
clients/​web/​src/​test/​core/​mcp/​node/​languageMirroringTransport.test.ts Tests language-header precedence and preservation.
clients/​web/​src/​test/​core/​mcp/​linearPatternValidator.test.ts Covers compile-budget and schema-identifier isolation.
clients/​web/​src/​test/​core/​mcp/​fetchTracking.test.ts Tests bounded line buffering and event counting.
clients/​web/​src/​test/​core/​mcp/​acceptLanguage.test.ts Tests metadata extraction and header-value constraints.
clients/​web/​src/​components/​groups/​ServerSettingsModal/​ServerSettingsModal.tsx Connects the cookie-jar toggle to settings.
clients/​web/​src/​components/​groups/​ServerSettingsModal/​ServerSettingsModal.test.tsx Tests toggle updates and omission when disabled.
clients/​web/​src/​components/​groups/​ServerSettingsForm/​ServerSettingsForm.tsx Adds the HTTP cookie-jar control.
clients/​web/​src/​components/​groups/​ServerSettingsForm/​ServerSettingsForm.test.tsx Tests cookie-jar visibility and interaction.
clients/​web/​src/​components/​groups/​ServerSettingsForm/​ServerSettingsForm.stories.tsx Supports the toggle in interactive stories.
clients/​tui/​src/​components/​ToolTestModal.tsx Gates the tool form while another overlay owns input.
clients/​tui/​src/​components/​RootsModal.tsx Gates root-entry form input.
clients/​tui/​src/​components/​ResourceTestModal.tsx Gates resource-template form input.
clients/​tui/​src/​components/​PromptTestModal.tsx Gates prompt form input.
clients/​tui/​src/​components/​GatedForm.tsx Unmounts inactive forms while retaining committed values.
clients/​tui/​__tests__/​GatedForm.test.tsx Tests defaults, input isolation, and draft retention.
clients/​mcpdo/​vitest.config.ts Enforces coverage thresholds on Windows too.
clients/​mcpdo/​src/​connection/​ema-login-helper.ts Emits classified authentication-helper errors.
clients/​mcpdo/​src/​connection/​auth-helper.ts Preserves error classifications across the helper boundary.
clients/​mcpdo/​__tests__/​rate-limit-envelope.test.ts Makes daemon rate-limit tests cross-platform.
clients/​mcpdo/​__tests__/​oauth-error-envelope.test.ts Enables OAuth envelope tests on Windows.
clients/​mcpdo/​__tests__/​mcp-elicitation.test.ts Uses cross-platform daemon teardown.
clients/​mcpdo/​__tests__/​mcp-connection.test.ts Enables connection tests with portable cleanup.
clients/​mcpdo/​__tests__/​helpers/​platform.ts Limits Windows skips to POSIX-specific behavior.
clients/​mcpdo/​__tests__/​helpers/​fake-daemon.ts Publishes fake tokens by daemon directory.
clients/​mcpdo/​__tests__/​helpers/​daemon-endpoint.ts Adds portable endpoint and teardown helpers.
clients/​mcpdo/​__tests__/​ema-login-helper.test.ts Checks relayed usage-error classification.
clients/​mcpdo/​__tests__/​elicitation-client.test.ts Supports named pipes in elicitation tests.
clients/​mcpdo/​__tests__/​directory-read.test.ts Enables directory-read tests on Windows.
clients/​mcpdo/​__tests__/​daemon-private.test.ts Makes private-daemon tests and cleanup portable.
clients/​mcpdo/​__tests__/​daemon-handshake.test.ts Exercises daemon authentication over platform-derived endpoints.
clients/​cli/​src/​handlers/​load-interrupt.ts Absorbs delayed signal re-raises after load runs.
clients/​cli/​README.md Documents the broadcast subscription fixture.
clients/​cli/​__tests__/​subscriptions-broadcast.test.ts Tests fan-out delivery, replay, and cleanup.
clients/​cli/​__tests__/​metadata.test.ts Tests CLI language-header mirroring.
clients/​cli/​__tests__/​load-summary.test.ts Covers delayed signal handling and listener cleanup.
clients/​cli/​__tests__/​load-output.test.ts Tests rate display for stepped runs.
.claude/​skills/​test-servers/​SKILL.md Lists the broadcast showcase configuration.
.claude/​skills/​release/​SKILL.md Adds manual v1 deprecation and verification steps.

Review effort: Balanced

Comment on lines +143 to +146
const withCookieJar =
settings?.cookieJar === true && "url" in config
? createCookieJarWrapper(new URL(config.url))
: (inner: typeof fetch): typeof fetch => inner;
@cliffhall
cliffhall merged commit eb54b44 into main Nov 18, 2026
10 checks passed
@cliffhall
cliffhall deleted the v2/chore/milestone-merge-v2.16.0 branch November 18, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Issues and PRs for v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release 2.16.0 step 2: merge v2/main into main and cut the release

2 participants