Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,9 @@ jobs:
- name: Run cloud shard
if: matrix.target == 'cloud'
env:
MCP_SESSION_TIMEOUT_MS: "3000"
# Long enough for the cap-eviction scenario to hold more sessions
# resident than the e2e cap (see e2e/setup/resident-runtime-cap.ts).
MCP_SESSION_TIMEOUT_MS: "8000"
# Still 18x shorter than production, but long enough for a cold Vite
# resume route to compile under a fully loaded CI runner.
MCP_PAUSED_SESSION_IDLE_TIMEOUT_MS: "30000"
Expand Down
6 changes: 5 additions & 1 deletion e2e/setup/mcp-session-timeouts.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
const DEFAULT_E2E_MCP_SESSION_TIMEOUT_MS = 3_000;
// Expiry coverage waits on this, so it stays far below production's five
// minutes. Its floor is the cap-eviction scenario: it opens sessions one at a
// time and needs cap + 1 of them resident at once, so that many opens must
// finish inside this window (see resident-runtime-cap.ts).
const DEFAULT_E2E_MCP_SESSION_TIMEOUT_MS = 8_000;
// Keep expiry coverage fast while leaving enough room for a cold browser route
// to compile under CI contention. Production allows nine minutes.
const DEFAULT_E2E_MCP_PAUSED_SESSION_IDLE_TIMEOUT_MS = 30_000;
Expand Down
8 changes: 8 additions & 0 deletions e2e/setup/resident-runtime-cap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,12 @@
// expect), that is not a correctness bug — eviction is designed to be
// transparent, restoring on the next call — but it means this constant needs
// to grow: raise it here, never by special-casing a scenario against it.
//
// The idle timeout bounds it from the other side. The scenario opens sessions
// one at a time while each one idles out MCP_SESSION_TIMEOUT_MS after it opened,
// so cap + 1 opens must finish inside that window or residency never reaches
// the cap. An open costs about 80-125ms on a CI runner, and more on slower
// machines: 25 opens took the whole of the old 3s window, and the scenario
// failed whenever they ran over. Growing this constant means growing that
// timeout too (mcp-session-timeouts.ts and the cloud shard env in ci.yml).
export const E2E_MCP_RESIDENT_RUNTIME_SOFT_CAP = 24;
Loading