chore(toolhive): 0.42.0 → 0.42.1 for the slow-backend session fix - #5398
Merged
Conversation
v0.42.0 could let a backend that is merely SLOW — not down — drag its whole vMCP tenant's client-facing success rate to roughly a coin flip (stacklok/toolhive#5861). Health status gated capability aggregation but never CONNECTION ESTABLISHMENT, which runs first: the new-session backend list was the registry unfiltered, `makeBaseSession` blocks on every backend it attempts, and the circuit breaker's `CanAttempt()` had exactly one production caller — the monitor's own loop. So every new session re-attempted a backend the monitor already knew was bad and re-paid close to the full timeout. ★ WHY THIS IS OURS AND NOT SOMEBODY ELSE'S BUG. witan IS that backend under load: measured 2026-08-13 against CI, single `memory_store` handlers ran 3-36s (median 15s) during a 24-writer burst. The fix (#6162) quantifies the amplification — "the regression test measures 8s of session-creation delay from a 2s backend", 4x, because the handshake makes several sequential round trips each paying full latency. That is the leading candidate for a gap we could not explain: 13 client-side failures against only 3 handlers that ran past 30s. Each probe worker is a separate process opening a fresh session, so it pays amplified session establishment BEFORE its tool call — invisible to witan's own `duration_ms` and to its write gate alike. Fixed 2026-08-07, two days after v0.42.0 cut. ── THE THREE BREAKING CHANGES, EACH CHECKED AGAINST THE LIVE CLUSTER ── 1. Non-JSON POSTs rejected when Cedar authorization is enabled — DOES NOT APPLY. `spec.authzConfig` is null on our VirtualMCPServer; ToolHive's Cedar authz is not enabled. (witan's Cedar policies live in omnigraph, which is a different enforcement point entirely and is untouched by this.) 2. vMCP tools hidden from `tools/list` are no longer directly callable — DOES NOT APPLY. Our aggregation config sets only `conflictResolution: priority`; no `filter`, `excludeAll` or `excludeAllTools` anywhere. 3. MCPOIDCConfig inline issuer/JWKS URL validation, which flips a bad config to Valid=False and BLOCKS RECONCILIATION of every workload referencing it — DOES NOT APPLY, and this was the one worth checking. Both inline configs (witan/witan-vmcp-oidc, toolhive-swe/swe-vmcp-oidc) carry HTTPS issuers, no inline JWKS URL, and `insecureAllowHTTP: false`. ── BLAST RADIUS ── The operator injects `toolhiveRunnerImage` and `vmcpImage` into child workloads at runtime via env vars, so this rolls proxyrunner and vmcp to v0.42.1 for EVERY ToolHive workload in the environment — toolhive-swe as well as witan, not just the one that motivated it. `pulumi preview` CI: `~ 2 to update, 2 unchanged`, both Helm releases with `diff: ~version` and nothing else. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JYb9sMjetD9Nxjf24Aw3m5
Contributor
There was a problem hiding this comment.
Pull request overview
Bumps ToolHive operator and CRD charts to v0.42.1, incorporating the upstream slow-backend session fix and security hardening.
Changes:
- Updates both ToolHive chart versions from 0.42.0 to 0.42.1.
- Rolls v0.42.1 workloads across all ToolHive tenants during reconciliation.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
What are the relevant tickets?
No GitHub issue — tracked in witan's task graph under
wp-witan-multi-user-service-deployment-dcf6ee. Upstream: stacklok/toolhive#5861 (report) and #6162 (fix).Description (What does it do?)
Bumps
TOOLHIVE_OPERATOR_CHART_VERSIONandTOOLHIVE_OPERATOR_CRDS_CHART_VERSIONfrom0.42.0to0.42.1.Why now. In v0.42.0 a backend that is merely slow — not down, not erroring — could drag its entire vMCP tenant's client-facing
initializesuccess rate to roughly a coin flip, with no self-healing. Health status gated capability aggregation but never connection establishment, which runs first: the new-session backend list was the registry unfiltered,makeBaseSessionblocks on every backend it attempts, and the circuit breaker'sCanAttempt()had exactly one production caller — the monitor's own background loop. Every new session re-attempted a backend the monitor already knew was bad, and re-paid close to the full timeout.witan is that backend under load. Measured 2026-08-13 against CI during a 24-writer burst, single
memory_storehandlers ran 3–36s, median 15s. The upstream fix quantifies the cost:That is the leading candidate for a gap we could not previously explain: 13 client-side failures against only 3 handlers that ran past 30s. Each concurrency-probe worker is a separate process opening a fresh session, so it pays amplified session establishment before its tool call — invisible both to witan's own
duration_msmetric and to its client-side write gate. The fix merged 2026-08-07, two days after v0.42.0 was cut, so we do not have it.The three breaking changes, each checked against the live cluster
v0.42.1 is a security-hardening release. All three breaking changes were verified as non-applicable before bumping — the third is the one that mattered:
Non-JSON
POSTs rejected when Cedar authorization is enabled — does not apply.spec.authzConfigisnullon ourVirtualMCPServer; ToolHive's Cedar authz is not enabled. (witan's Cedar policies live in omnigraph, a different enforcement point entirely, untouched by this.)vMCP tools hidden from
tools/listare no longer directly callable — does not apply. Our aggregation config sets onlyconflictResolution: prioritywith apriorityOrder; there is nofilter,excludeAllorexcludeAllToolsanywhere.MCPOIDCConfiginline issuer/JWKS URL validation — does not apply, and this is the one that could have hurt: a malformed or plain-HTTP URL flips the config toValid=Falseand blocks reconciliation of every workload referencing it. Both inline configs carry HTTPS issuers, no inline JWKS URL, andinsecureAllowHTTP: false:witan/witan-vmcp-oidchttps://sso-ci.ol.mit.edu/realms/ol-platform-engineeringtoolhive-swe/swe-vmcp-oidchttps://toolhive-swe.ci.ol.mit.eduThe operator injects
toolhiveRunnerImageandvmcpImageinto child workloads at runtime via env vars (TOOLHIVE_RUNNER_IMAGE/VMCP_IMAGE) rather than rendering them as chartimage:keys. So this rolls proxyrunner and vmcp to v0.42.1 for every ToolHive workload in the environment —toolhive-sweas well aswitan, not just the one that motivated it. Expect both tenants' MCP pods to restart on reconcile.How has this been tested?
pulumi previewagainst CI:Both charts confirmed to exist at
0.42.1(helm show chart oci://ghcr.io/stacklok/toolhive/...), each with matchingappVersion: 0.42.1.pre-commitover the diff: ruff, ruff format and mypy pass.Not yet applied. This has not been observed against a running cluster — the claim that it explains the session-establishment gap is a hypothesis from the upstream regression test, and wants a re-run of the concurrency probe after deploy to confirm.
Does this change require a change to documentation?
No.