Skip to content

Open cap-eviction sessions at the build-slot cap - #1872

Draft
RhysSullivan wants to merge 1 commit into
mainfrom
cap-eviction-cold-burst
Draft

Open cap-eviction sessions at the build-slot cap#1872
RhysSullivan wants to merge 1 commit into
mainfrom
cap-eviction-cold-burst

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

The cap-eviction scenario fails on nearly every main run since it landed: openSession (session-4): no mcp-session-id header. The scenario and the session-build semaphore merged within minutes of each other and were never tested together — the scenario's last green run predates the semaphore.

Mechanism, from the failed shard's boot.log: the scenario opened cold sessions 8 at a time, but only 4 build slots exist, so the surplus inits sat queued inside the Durable Object's blockConcurrencyWhile window. On a CI runner where four concurrent builds already saturate the CPU, queue wait plus build time crossed workerd's budget — blockConcurrencyWhile() ... waited for too long, the platform reset the DO, and initialize returned without a session id.

The burst width is incidental to what the scenario pins (cap eviction through a real cross-DO request, which only needs the total session count to cross the cap), so it now opens sessions at the build-slot cap. No assertions changed.

The queue-inside-blockConcurrencyWhile interaction itself is real but bounded in production: 10s max queue wait plus a 1-2s build fits the 30s budget. It only overflows when builds themselves crawl, which is the starved-CI condition.

Verified: the scenario passes locally with the change.

@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare preview

Console https://executor-preview-pr-1872.executor-e2e.workers.dev
MCP https://executor-preview-pr-1872.executor-e2e.workers.dev/mcp
Deployed commit 6b41960

Sign-in is Cloudflare Access (one-time PIN to an allowed email). The preview has its own database and encryption key; it is destroyed when this PR closes.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud 6b41960 Aug 30 2026, 04:48 AM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing 6b41960 Commit Preview URL

Branch Preview URL
Aug 30 2026, 04:49 AM

@pkg-pr-new

pkg-pr-new Bot commented Aug 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@1872

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@1872

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@1872

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@1872

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@1872

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@1872

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@1872

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@1872

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@1872

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@1872

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@1872

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@1872

executor

npm i https://pkg.pr.new/executor@1872

commit: 6b41960

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant