Skip to content

Fix the local e2e suite and guard it in CI - #1558

Draft
RhysSullivan wants to merge 3 commits into
mainfrom
fix-local-e2e-failures
Draft

Fix the local e2e suite and guard it in CI#1558
RhysSullivan wants to merge 3 commits into
mainfrom
fix-local-e2e-failures

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

Every failing scenario in the local e2e project, plus the CI gap that let them rot.

What was broken

1. Toolkit-scoped MCP returned 500 on every request — a real product bug, not a test problem.

POST /mcp/toolkits/<slug> answered -32603 Internal server error. createConfigForResource built the toolkit session with createExecutorHandle, which opens the local data dir — but the running server already holds that dir's EXCLUSIVE ownership lock, so the second open failed against our own lock (Failed to open local SQLite data). Reproducible outside the harness with plain curl; the unscoped /mcp endpoint was fine.

createExecutorHandle now accepts a borrowedDb, and the toolkit path passes the running server's handle. A toolkit session differs from the default one only in its plugin set, so sharing the handle is what it always wanted. The borrowed handle is not closed when the derived executor disposes.

This has been broken since the data-dir lock landed (#1175, Jun 28), two days after the toolkit MCP path (Jun 26).

2. cli-mcp-daemon-attach-stress threw Bun is not defined — 2 of 3 tests, every run. The file used Bun.spawn, Bun.sleep, and web-stream readers, but vitest runs this suite under Node. Ported to node:child_process, matching the rest of the harness.

3. auth.test.ts waited on a "built-in" label the UI stopped rendering. Both tests timed out after 30s on getByText("built-in"). The failure screenshot shows the app working correctly — authenticated, integrations loaded — and the row renders name + slug; built-in is only an internal kind value. Switched to the stable data-testid the list already exposes.

Why they rotted

CI only ever ran local/stdio-mcp.test.ts. This PR expands that step to the MCP-surface scenarios (stdio, toolkits, native elicitation, daemon attach) — the regression guards that need no browser. The browser-dependent scenarios stay out, so the pre-existing flakiness stays out too.

Verification

All 14 files in the local project pass. Run in batches locally: the 6 MCP/auth scenarios, then the 5 CLI scenarios, then the remaining 3.

typecheck, lint, format:check clean; apps/local unit tests 71 passed.

Notes

  • local/mcp-browser-approve.test.ts failed once when run in a 6-file batch and passed on its own — boot-resource contention, the flakiness the CI comment already describes. Not addressed here.
  • The cloud project is not verified locally (it exceeds this machine's process budget); CI covers it. The E2E (cloud 3of4) cloud signIn: callback set no session (500) failure seen on the release PR is untouched by this branch and still unexplained — it reran green there.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 8, 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 4089b65 Commit Preview URL

Branch Preview URL
Aug 08 2026, 02:00 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 8, 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 4089b65 Aug 08 2026, 02:02 AM

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Console https://executor-preview-pr-1558.executor-e2e.workers.dev
MCP https://executor-preview-pr-1558.executor-e2e.workers.dev/mcp
Deployed commit 4089b65

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 8, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

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

@executor-js/config

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

@executor-js/execution

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

@executor-js/sdk

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

@executor-js/codemode-core

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

@executor-js/runtime-quickjs

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

@executor-js/plugin-file-secrets

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

@executor-js/plugin-graphql

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

@executor-js/plugin-keychain

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

@executor-js/plugin-mcp

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

@executor-js/plugin-onepassword

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

@executor-js/plugin-openapi

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

executor

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

commit: 4089b65

@RhysSullivan

Copy link
Copy Markdown
Collaborator Author

Note on CI coverage: the E2E (local MCP) job is gated if: github.event_name != 'pull_request', so the expanded step shows as skipped on this PR and will first execute on push to main after merge. The scenarios were verified locally instead — all 14 files in the local project pass.

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