Skip to content

Speed up selfhost e2e: tunable sandbox deadline + 3-way sharding - #1551

Open
RhysSullivan wants to merge 1 commit into
mainfrom
selfhost-e2e-speedup
Open

Speed up selfhost e2e: tunable sandbox deadline + 3-way sharding#1551
RhysSullivan wants to merge 1 commit into
mainfrom
selfhost-e2e-speedup

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

The selfhost E2E lane is the long pole of CI (~15 min, single serial job). Two changes:

Tunable sandbox deadline. The sandbox-deadline scenario (resume-after-sandbox-deadline.test.ts) proves approvals granted inside their own windows survive an execution that outlives the sandbox's absolute budget — a ratio, not an absolute duration. It previously waited out the production 5-minute budget in real time (~5.75 min of sleep, ~38% of the lane) and did so only on selfhost: cloud CI's short paused-session window makes it skip there. The selfhost app now accepts EXECUTOR_SANDBOX_TIMEOUT_MS (validated at boot, refuses malformed values), the e2e boot recipe shrinks it to 20s via a shared constant (e2e/setup/sandbox-timeout.ts, same pattern as execution-limits.ts), and the scenario scales its delays off the configured budget. It now proves the same race in ~25s on selfhost and still runs the full-length journey on any target without the knob.

3-way sharding. The selfhost job now shards like cloud's 4-way matrix. Each shard is its own runner booting its own hermetic instance (own port block + data dir), so the project's shared-bootstrap-admin assumption and fileParallelism: false semantics are unchanged per shard. Artifact upload names already derive from shard-name.

Expected: selfhost E2E wall time drops from ~15 min to ~4–5 min.

Verified locally: the deadline scenario passes in 29s against the 20s budget (and exercises the race — the sleeps genuinely cross the budget); execution-heavy scenarios (toolkits-mcp, artifact-approval, policy-tool-approval, mcp-execute) pass against the shrunken budget since per-dispatch deadline resets keep normal executions inside it; full --shard=3/3 slice passes (27 files, 47 tests); typecheck, lint, format clean.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 6, 2026

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 d03edce Aug 06 2026, 11:04 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 6, 2026

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 d03edce Commit Preview URL

Branch Preview URL
Aug 06 2026, 11:04 PM

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Console https://executor-preview-pr-1551.executor-e2e.workers.dev
MCP https://executor-preview-pr-1551.executor-e2e.workers.dev/mcp
Deployed commit d03edce

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.

@pkg-pr-new

pkg-pr-new Bot commented Aug 6, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

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

@executor-js/config

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

@executor-js/execution

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

@executor-js/sdk

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

@executor-js/codemode-core

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

@executor-js/runtime-quickjs

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

@executor-js/plugin-file-secrets

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

@executor-js/plugin-graphql

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

@executor-js/plugin-keychain

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

@executor-js/plugin-mcp

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

@executor-js/plugin-onepassword

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

@executor-js/plugin-openapi

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

executor

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

commit: d03edce

@RhysSullivan
RhysSullivan marked this pull request as ready for review August 7, 2026 02:09
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