Skip to content

E2E: fix the concurrent editor routing spec's attach gate and connection deadlock - #49

Merged
duolahypercho merged 1 commit into
mainfrom
codex/fix-concurrent-editor-e2e
Aug 18, 2026
Merged

E2E: fix the concurrent editor routing spec's attach gate and connection deadlock#49
duolahypercho merged 1 commit into
mainfrom
codex/fix-concurrent-editor-e2e

Conversation

@duolahypercho

Copy link
Copy Markdown
Owner

Root cause

workflow.spec.ts "routes concurrent editor calls to the owning page and session" timed out intermittently under the full suite (7/12 in the PR45 authoring run, reproduced locally on merge trees and on harness's direct repeat-3). Two compounding problems:

  1. Attach registration gate. The spec polled editor_attach on request (outgoing), then immediately fired editor_tool_call. Core registers the session's editor owner while handling the attach, so the tool call could arrive before an owner existed and hang until the 60s test timeout instead of failing with a reason. requestfinished fires after the response is back, which is the point where the attach is actually applied.
  2. Browser connection pool deadlock. The two long-lived editor_tool_call invocations were issued through each page's own fetch from page.evaluate. Under the 9-worker suite these page-owned connections can deadlock the browser's pooled connection set, which is also why the timeout surfaced as page.evaluate: Test ended / browserContext.close in cleanup. Routing only those two RPCs through Playwright's typed APIRequestContext removes the page-origin connection dependency; the routing assertions are unchanged.

Changes

  • client/e2e/workflow.spec.ts: capture editor_attach on requestfinished instead of request; add callRpcFromRunner and use it for the two concurrent editor_tool_call invocations only. No product/App/SSE/permission changes.

Verification

  • npx tsc -b --noEmit: pass
  • pnpm test: 904 passed
  • pnpm build: pass
  • Targeted pnpm test:e2e -- --grep "routes concurrent" --repeat-each=3: 3/3 pass
  • Full pnpm test:e2e (71 tests): 71 passed

…ls through the runner API

The concurrent-editor spec polled until the editor_attach *request* was seen,
then fired editor_tool_call from each page's own fetch context. Core registers
the session owner while handling the attach, so a tool call could arrive before
registration and hang to the 60s timeout; under a full nine-worker suite the
two page-owned connections also deadlock the browser's pooled connection set.
Gate on requestfinished (attach response applied) and run only the two
long-lived editor_tool_call invocations through Playwright's APIRequestContext,
leaving the routing assertions unchanged.
@duolahypercho
duolahypercho marked this pull request as ready for review August 18, 2026 01:09
@duolahypercho
duolahypercho merged commit e17cf2b into main Aug 18, 2026
4 checks passed
@duolahypercho
duolahypercho deleted the codex/fix-concurrent-editor-e2e branch August 18, 2026 01: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