Repository navigation
Description
publish-site's local Chrome verification has now failed twice in two days in the same way. Chrome aborted a page's module loads with net::ERR_NETWORK_CHANGED, and in both runs the abort came while the local wrangler dev was starting that page's own reader container. The page's timing matches a Chrome socket flush triggered when Docker changes the host's network interfaces. That makes this a race in how scripts/verify-site-local.sh arranges the browser and the container on one host, not a random runner blip. I haven't opened a fix because I can't reproduce it in the bot sandbox, which has no Docker, and each available mitigation needs a maintainer's call (see below).
The two failures
| Run | Commit | Page that never presented | Browser errors |
|---|---|---|---|
| 35827698414 | 4b29892 | /examples/triage-board/ |
3× ERR_NETWORK_CHANGED, 1× 404 (/favicon.ico) |
| 35779729696 (#953) | 50a9fed | /how-it-works/ (neighbor page) |
3× ERR_NETWORK_CHANGED |
Both raise from await_presentation in scripts/verify_site.py, and the page's own startup report says outcome: 'timeout', reason: 'entry module did not load'. In both, the Worker log shows every asset answered 200, so the aborts happened only on the browser side.
Why this looks durable rather than transient
The Worker log puts every failing load inside that page's container prewarm:
- Today:
container_prewarm_startedfor/examples/triage-board, then the page GET and all its runtime bundles, thencontainer_prewarm_completed(1808 ms). The startup report then saystimeout. The root page/loaded before it and presented at 875 ms, before its own prewarm finished (1888 ms). - ci-fix: transient failure on 35779729696 #953:
/and/examples/triage-boardeach presented. Thencontainer_prewarm_startedfor/how-it-works, the page GET,container_prewarm_completed, and the page timed out.
Chromium answers an OS IP-address-change notification by flushing its socket pools with ERR_NETWORK_CHANGED for every destination, including 127.0.0.1 (#953 cites TransportClientSocketPool::OnIPAddressChanged). Starting a container under Docker's default bridge networking adds a host-side veth interface. That the veth is what triggers Chrome's notification here is my inference from the timing; I haven't observed it directly. Most runs pass because the flush has to land while module requests are in flight. Once a page's modules have loaded, the flush no longer matters.
None of this applies in production: the deployed site's containers run on Cloudflare, not on the reader's machine. Only the local verifier puts Chrome and Docker on one host.
Why no automated fix
Each option changes a deployment gate or its arrangement, and I couldn't validate any of them here:
- Start the container before loading the page it serves. If the verifier started each reader's container before navigating (or waited for the prewarm to finish before measuring), the interface change would come before the module loads. This keeps the gate failing closed, but it moves container start out of the startup profile the verifier reports.
- Isolate Chrome from host interface changes, for example by running the browser in its own network namespace. This removes the race without changing what is measured, but it needs privileges and setup the workflow doesn't have today.
- Retry the navigation on
ERR_NETWORK_CHANGEDonly. This is narrow, but it is the retry around a gate that ci-fix: transient failure on 35779729696 #953 argued against, because it would also hide a page that really stopped presenting.
After #953 the next publish-site run passed and deployed, so a hit doesn't leave main stuck. It still blocks that commit's deploy until the next run.
Also seen in both logs: repeated registry.json fetches
During the failing page load, the Worker log records about 30 network GETs of that page's revisions/<r>/registry.json, while leaf.js and each runtime bundle were fetched once. #953 noted the same thing. The verifier dumps the Worker log only on failure, so no green run gives a baseline. It isn't clear whether this is normal for a page whose entry module failed or a separate defect.
Activity
leaf-agent commentedon Sep 23, 2026
Triage: the overlap is how the Worker is built, not a coincidence of timing. Leaving this open without a fix, since the options below change what the deploy gate measures and I can't run Docker here to test any of them.
The Worker starts a page's container from that page's own document response. When
AGENT_PREWARMis"true", aGETwithSec-Fetch-Dest: documentpassesprewarmContainertoctx.waitUntil(worker/src/index.ts#L907-L921). The localwrangler devinscripts/verify-site-local.shruns without--env, so it reads the top-levelAGENT_PREWARM = "true"fromworker/wrangler.toml. So each page the verifier opens for the first time starts a local container while that page is fetching its modules. Both logs show exactly that:container_prewarm_startedright before the page GET, andcontainer_prewarm_completedafter its bundles. The veth link to Chrome's socket flush is still an inference, but the overlap is deterministic, so every newly opened page is exposed to the race, not only an unlucky one.That points the first option at a specific place. The verifier could start the container for a page's reader identity before it measures that page. One way is a document-typed request in the same browser context, which then waits for the container to be running. This keeps the gate failing closed and leaves the production prewarm path as it is. The other way is to turn off
AGENT_PREWARMfor the local verifier. That just moves the container start to the first API request, which may still overlap a later page's module loads, and the verifier would then stop exercising prewarm. Which of the two is right depends on whether prewarm latency should stay inside the startup profile the verifier reports. That's the open decision.leaf-agent commentedon Sep 23, 2026
A third occurrence, and the first outside
publish-site: run 35835735946 on #996, inci'stestjob. The step isMeasure the bundled release in Chrome, which runs the samescripts/verify-site-local.sh, and the failure is the shape this issue describes, on the same page as the first row above:Every other step in that job passed, including the everyday pytest gate, the browser framework check, the runtime folds, and the Worker tests. #996 changes one nightly test file and nothing this step reads.
The scope note matters for the mitigation choice: this is a
pull_requestgate as well as a deploy gate, so a hit costs a contributor a redteston a PR that has nothing to do with the site, not only a blocked deploy. Three hits in three days across two workflows.Run the local site verification with container prewarm off (#1027)