You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky console lane: workers.spec.ts route.fetch gets ECONNREFUSED from the daemon it just answered #642
Only workers.spec.ts is affected, and only through its two page.route helpers, both of
which call route.fetch() against the daemon after openConsole has already talked to it.
106 of 107 specs pass each time, so the fleet is up; the refused connect looks like a
race between the page's route interception and the daemon's listener rather than a
console regression.
The lane runs Chromium only for these PRs, so a rerun is cheap and usually passes.
Expected
The console lane's response-rewriting helpers do not fail with a refused connect on a
fleet every other spec in the same run reaches.
Confirmed, reproduced deterministically. Test-side gap: the helper rethrows a connect refused when the test's own finally disposes the gateway between interception and its route.fetch().
Reproduction
e2e/console/workers-gateway-stops-mid-fetch.spec.ts on bug/642-repro (f0b7a19e):
Red 3/3, the lane's signature at workers.spec.ts:95:36. It parks one intercepted re-read before its fetch and releases it only after the listener is confirmed gone. Control: the same handler answers first; releasing before the dispose is green. A handler rejection fails the test at the handler line while the body would wait — why CI shows no assertion.
Root cause
Gap, in test code. The console re-reads /v1/workers every second (ui/src/data/live/connection.ts:5). The helpers answer that re-read with route.fetch() from the gateway (e2e/console/workers.spec.ts:95), and fleet tests stop the gateway in finally; HttpGateway.stop closes the listener and destroys open sockets (src/http/server.ts:207-219). A poll intercepted before the close and fetched after it is refused; destroyed mid-request it reads as socket hang up. Census, 198 recent Console job runs: 7 failures, all at 95:36 (:332 ×3, :441 ×3, :831 ×1; 6 chromium, 1 firefox), green on rerun.
Simplest fix
Catch the connect-level rejection in answerWithoutLoad and answerMemory and drop that re-read (route.abort()) instead of rethrowing, mirroring e2e/helpers/http-daemon.ts. The test's expectation is a proposal; bug:ready accepts it.
Alternatives rejected
page.close() before each dispose — fixes this case, leaves the helper brittle.
Delaying the dispose — polling plus teardown makes the window irreducible.
Activity
fix(contract): retire helper import boundary exemptions (#627)
V3RON commentedon Oct 17, 2026
Confirmed, reproduced deterministically. Test-side gap: the helper rethrows a connect refused when the test's own
finallydisposes the gateway between interception and itsroute.fetch().Reproduction
e2e/console/workers-gateway-stops-mid-fetch.spec.tsonbug/642-repro(f0b7a19e):Red 3/3, the lane's signature at
workers.spec.ts:95:36. It parks one intercepted re-read before its fetch and releases it only after the listener is confirmed gone. Control: the same handler answers first; releasing before the dispose is green. A handler rejection fails the test at the handler line while the body would wait — why CI shows no assertion.Root cause
Gap, in test code. The console re-reads
/v1/workersevery second (ui/src/data/live/connection.ts:5). The helpers answer that re-read withroute.fetch()from the gateway (e2e/console/workers.spec.ts:95), and fleet tests stop the gateway infinally;HttpGateway.stopcloses the listener and destroys open sockets (src/http/server.ts:207-219). A poll intercepted before the close and fetched after it is refused; destroyed mid-request it reads assocket hang up. Census, 198 recent Console job runs: 7 failures, all at95:36(:332 ×3, :441 ×3, :831 ×1; 6 chromium, 1 firefox), green on rerun.Simplest fix
Catch the connect-level rejection in
answerWithoutLoadandanswerMemoryand drop that re-read (route.abort()) instead of rethrowing, mirroringe2e/helpers/http-daemon.ts. The test's expectation is a proposal;bug:readyaccepts it.Alternatives rejected
page.close()before each dispose — fixes this case, leaves the helper brittle.Risk
long-lists.spec.ts:123is the same shape; its daemon outlives its tests, so never flakes.bug/642-repro, adapting its test to the real helpers.Side findings
ENOENT daemon.sockblip: a distinct cause (the CLI's 5 s auto-launch deadline).Written by an agent.
fix: the workers-list lane helpers drop a re-read refused by a stoppi…
test: pin the helpers' drop of socket hang up and ECONNRESET, and ans…
fix(console): the workers-list lane helpers drop a re-read refused by…
V3RON commentedon Oct 17, 2026
Delivery run
Merged: #667 (#642)
Written by an agent.