fix(vmcp): bound initialize to healthCheckTimeout - #6380
Open
RaviTharuma wants to merge 5 commits into
Open
Conversation
RaviTharuma
requested review from
ChrisJBurns,
JAORMX,
amirejaz,
blkt,
jerm-dro,
jhrozek,
rdimitrov,
reyortiz3 and
tgrunnagle
as code owners
August 19, 2026 07:00
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Author
A new session waited on every backend's 30s init timeout, so initialize could hang past gateway limits while Ready and /health stayed OK. Cap MakeSession to healthCheckTimeout (default 10s) and document the three signals. Fixes stacklok#6345
Contributor
Author
|
Automated fix: rebased onto main (20 commits). Remaining golangci findings are in operator files this PR does not touch (gci/staticcheck SA1019). |
RaviTharuma
force-pushed
the
fix/vmcp-bound-initialize
branch
from
August 20, 2026 16:41
72f5609 to
880e09d
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6380 +/- ##
==========================================
- Coverage 77.69% 77.67% -0.02%
==========================================
Files 752 756 +4
Lines 72717 72806 +89
==========================================
+ Hits 56500 56555 +55
- Misses 16212 16246 +34
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com>
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.
Cross-links
Summary
VirtualMCPServer Ready and
GET /healthcould stay OK while a new client'sinitializehung past typical gateway timeouts (12s) with a 0-byte response.Those signals are different operations:
/healthis liveness, Ready is thelast
ListCapabilitiesprobe, and initialize waits on backend handshakes(per-backend 30s, concurrency 10). This does not flip Ready/
/healthoninitialize failure (that would flap). It bounds the handshake.
MakeSessionbudget defaults to 10s (same as CRDhealthCheckTimeout)WithSessionInitTimeoutfromfailureHandling.healthCheckTimeoutwhen set
Fixes #6345
Type of change
Test plan
go test -ldflags=-extldflags=-Wl,-w ./pkg/vmcp/session/ -run 'TestWithSessionInitTimeout|TestNewSessionFactory_SessionInitTimeout|TestNewSessionFactory_BackendInitTimeout|TestNewSessionFactory_AllBackendsFail'healthCheckTimeout;/healthremains liveness-onlyAPI Compatibility
This does not change the CRD schema.
healthCheckTimeoutalready exists; itnow also bounds session initialize.
Does this introduce a user-facing change?
Yes. New vMCP sessions finish initialize within
healthCheckTimeout(default 10s). Slow backends are omitted from that session instead of
blocking the client.
/healthis documented as liveness only.Special notes for reviewers
Direction from #6345: Ready is ListCapabilities, initialize is a different
handshake. Bounding + documenting is the agreed path; a separate SessionReady
signal is left for a follow-up if you want it.