Repository navigation
Closed
Labels
tend-ci-causeA root cause of a CI failure report
Description
The hosted journey in publish-site run 40596480831 failed at 22:57:33 UTC on October 27 while polling GET /examples/triage-board/api/state: Playwright raised APIRequestContext.get: read ECONNRESET. The traceback is run_journey → ask_until_answered → await_turn → BrowserEnd.state → read_state. Public release verification had already passed at 22:56:39; the journey did not finish verifying the agent's answer.
This state-polling failure has appeared before in #3416, which was closed as transient. The current evidence does not establish whether these resets share a cause or where this reset occurred. Investigate the transport and state-reading boundary before adding retries or weakening the journey.
Evidence for investigation
- Run:
gh run view 40596480831 --log-failed, commitd0fb1f6adc32450560db027eed8e8e96f67976cd, releaseb9c270e593e4138648d6a7cf46433d8629f48869c26c894dfa2cd5eee5a50706. - Cloudflare Observability query using
worker/README.md, window 2026-10-27 22:57:28–22:57:38 UTC, filter$metadata.service=leaf-website, returned 81 records withabr_level=1. The returned records contain successful state invocations through 22:57:33.037 (01M5ZSAJVD0000000000000002), with status 200 and outcomeok; none of these records has metadata levelerror. This does not identify which request reset or prove a platform fault. - The component-filtered query for 22:56–22:58 also shows the hosted turn continuing model/tool work after the journey exited. It does not establish successful journey completion.
- The preceding completed publish run
40591361778passed. The next run40598683864was still in progress during triage. No older deployment was rerun. - Hosted journey reload fails when Durable Object storage resets #3989 tracks explicit Durable Object storage-reset errors. The current records do not establish that diagnosis here. Retry a reset website activation in the hosted agent pass #3334 concerns activation recovery; this failure is later state polling during an active turn.
Cause of a failure tracked in #4520.
Metadata
Metadata
Assignees
Labels
tend-ci-causeA root cause of a CI failure report
Activity
publish-sitefailing onmain(push) #4520leaf-agent commentedon Oct 27, 2026
The successful state invocations near the reset belong to two different transports. The latest success at 22:57:33 is browser HTTP/3 traffic; it does not show that the journey's
APIRequestContext.getreached the Worker. I’m leaving this open: the available evidence narrows the investigation to the HTTP/1.1 transport but does not establish a safe repository fix.Transport evidence and remaining gap
I repeated the Observability query for 2026-10-27 22:57:28–22:57:38 UTC, filtering
$metadata.service=leaf-website: 81 records,abr_level=1, below the 100-record limit.39dc27ae21b14e1e8244863d4a9e4bdf, raya5154cdb1f254a77. Both its edge and Durable Object invocations report status 200 and outcomeok.7a283789419c65c2f7a63e8c2f6fafc7, uses HTTP/3 and browser fetch headers. Both transports reach the same Durable Object and name the failing run's release and layer. Cookies are redacted, so they cannot independently identify the client.APIRequestContext.get: read ECONNRESETat 22:50:25 on/api/view?revision=1&through_seq=2, during release verification. That is evidence of another affected endpoint, rather than a demonstrated state-reader-specific defect.At the failed run's commit, read_state fails inside the request call, before HTTP-status checking or JSON decoding. No state assertion or agent-answer check produced this diagnostic. The preceding passing publish and the evidence from #3416 do not establish that this recurrence is resolved.
@max-sixty: locating this reset needs transport evidence absent from the retained run: Cloudflare ingress diagnostics for the failing connection, or client socket diagnostics captured during a recurrence. The decision needed is whether to obtain Cloudflare-side diagnostics or authorize adding narrowly scoped, credential-safe client transport capture to
publish-site(a control-plane change). I have not added retries or changed the journey's success checks.max-sixty commentedon Oct 28, 2026
add whatever diagnostics we need; don't we already have Cloudflare logs?
leaf-agent commentedon Oct 28, 2026
Yes—we already have Cloudflare Workers Observability logs; those are the server-side records queried above. They did not expose the client connection that reset without a matching recorded Worker invocation.
Added the missing client capture in #4604. During public release verification and the hosted journey, Playwright's Node driver will log UTC timestamps, socket reuse/lifecycle, peer addresses and ports, TLS negotiation, durations, status and Cloudflare ray IDs. Successful responses can be joined to Cloudflare's logs by ray ID; failures without a response retain socket evidence. These records go into the existing CI job log, excluding URLs, credentials, bodies and general header dumps.
The real-driver test passed for socket reuse and a forced connection reset, with planted credentials excluded from the output; a separate local HTTPS probe verified TLS records. CI passed on
b73937d3a.The PR awaits your control-plane review: repository policy says, “Changes to workflows, Tend's configuration, CODEOWNERS, or agent instructions require the control-plane owner's fresh approval.” This issue stays open for the next recurrence and diagnosis; the capture does not establish the reset's cause.
Record Playwright socket diagnostics during public release checks (#4604
leaf-agent commentedon Oct 29, 2026
New recurrence from #4711: publish-site run 40950044395 failed at 2026-10-29 20:52:15 UTC in the same
await_turn → state → read_statepolling path, withAPIRequestContext.get: read ECONNRESETon/examples/triage-board/api/state.The client capture added in #4604 now supplies new evidence: request 18 on socket 1 returned HTTP 200 at 20:52:13.221 UTC, ray
a5250fbe0f5c3409-BNA, after 12,907 ms. Request 19 reused that socket at 20:52:15.225 and failed withECONNRESETafter 27 ms, without a response or ray ID; the socket then closed withhadError: true. This establishes a reset on a reused connection, but does not identify which peer or intermediary caused it. The preceding successful ray and this narrow time window provide the server-log correlation point missing from the earlier recurrence.This issue remains the diagnosis owner; no retry or success-check change is justified by this evidence alone.
leaf-agent commentedon Oct 31, 2026
Cloudflare correlation now confirms that request 18 completed successfully through both Worker invocations; it still does not locate request 19's reset. The next diagnostic needs Cloudflare ingress/connection records, beyond the Workers Observability records available here. @max-sixty: please obtain those records through Cloudflare support for the connection following ray
a5250fbe0f5c3409-BNA, at 2026-10-29 20:52:15.225–20:52:15.252 UTC, from publish run 40950044395. This issue retains the engineering follow-up once that evidence is available.Server correlation and diagnostic limit
Queried Workers Observability for 2026-10-29 20:52:12–20:52:18 UTC, filtering
$metadata.service=leaf-website. It returned 28 records withabr_level=1, below the 100-record limit.a5250fbe0f5c3409, traceb5d184a59af5d0546361c0e02f7f3be7, and invocation records01M64PYH810000000000000002and01M64PYH8B0000000000000008. Both report HTTP 200 and outcomeok; their wall times are 12,819 and 12,869 ms. This matches the client's request 18 response at 20:52:13.221 UTC after 12,907 ms.Consolidate observer state reads and retry one connection reset (#4881)
leaf-agent commentedon Nov 4, 2026
New recurrence from #5382: publish-site run 41876972316 on
b1c7255d2a43b383bd1649e08f56a467e04a32bafailed at 17:57:09 UTC on November 4. The failure is in the sameawait_turn → state → read_statepath:APIRequestContext.get: Failed after 2 attempt(s): Error: read ECONNRESETon/examples/triage-board/api/state.This run shows something the earlier recurrences didn't: a freshly opened connection reset too, not only a reused keep-alive socket. Stale-socket reuse alone can't explain this failure.
publish-sitefailing onmain(push) #4711's recurrence the reset came after 27 ms.172.67.171.165:443and TLS 1.3 negotiated (authorized: true) by 17:57:04.573. Request 27 then reset after 5,315 ms, again without a response or ray ID.$metadata.service=leaf-website, 32 records,abr_level=1) records the preceding HTTP/1.1 state poll, request 25, at 17:56:59.079 (edge) and 17:56:59.195 (Durable Object), both status 200 and outcomeok. No HTTP/1.1 state invocation appears for requests 26 or 27. In that window, the browser's HTTP/3/api/newsand/api/staterequests to the same page succeeded, apart from two/api/newslong polls that endedcanceledafter about 8.6 s.So for the third time the reset happens before any recorded Worker invocation, and this time on a connection whose handshake had just succeeded. That points at the path between the runner and the Worker (Cloudflare ingress or an intermediary) rather than at
read_stateor the Worker's state handler. It still doesn't identify which peer sent the reset.Client socket timeline (from the run log)
a5557f9c6fc02c62-DFWsocket-error ECONNRESETat 17:57:04.246 (3,144 ms); socket closed withhadError: trueconnectat 17:57:04.533,tlsat 17:57:04.573request-error ECONNRESETat 17:57:09.814 (5,315 ms)a5557dd5d8a32c62-DFW) and request 20 took 19,582 ms (raya5557ecb99422c62-DFW)This issue still owns the diagnosis. The Cloudflare ingress records requested on October 31 remain the missing evidence; ray
a5557f9c6fc02c62-DFWand the window 17:57:01–17:57:10 UTC on November 4 give a second, more recent connection to look up.max-sixty commentedon Nov 5, 2026
Max's decision from the backlog triage: go ahead with this repair.
Repair: Treat a connection reset that arrives before the Worker records any request as transport noise the state poll retries through, keeping #4604's socket log.
What decides it: In all three cases the reset came before any Worker invocation, which places it between the runner and Cloudflare's edge. The symptom shows only in CI, so it doesn't need a Cloudflare support case.
leaf-agent commentedon Nov 5, 2026
Opened #5412 for this repair: the state read now retries through up to five connection resets, with Playwright's backoff doubling from 250 ms, so a read rides through about eight seconds of resets. #4604's socket log is unchanged. Merging it will close this issue.