You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(e2e): stop the cap-eviction scenario from stampeding cold DO starts
The scenario opened cap+10 sessions at concurrency 8, and every open is a
cold Durable Object start (sqlite open plus runtime construction inside
the agents SDK blockConcurrencyWhile). The burst regularly made those
blocks outlive the runtime wall-clock budget, so workerd reset the object
mid-initialize and the client received the 503 restart envelope instead
of an mcp-session-id header - the scenario then failed on the very first
reset. Fails on main today.
Two changes, root cause first:
- Open at concurrency 2. Cold starts no longer overlap into reset
territory; the scenario passes in ~5s locally, 4/4 consecutive runs.
- openSession now honors the restart envelope it can receive: on the
documented 503 "MCP session is restarting, please retry" response it
retries the same initialize after a short delay (bounded, 8 attempts)
instead of treating a retryable platform blip as a setup failure -
the same contract a real streamable-http client follows.
0 commit comments