The thing to prove is very specific: whether a brand-new browser with zero cache can fully download the startup resources of four engines and reach the native title screen.
“Brand-new” is provable: four fresh Chromium profiles, with object counts, Service Workers, and Cache Storage all at zero before launch, no pre-filled cache, no reading of existing resource copies, and no purging of the Cloudflare cache. Requests are triggered on demand, one at a time, with at least 5 seconds between starting points, and the whole round stops immediately on a 429/503.
After the first round, all 102 resource requests returned 200, and all four showed their native screens. It looked like time to write “pass.”
But the overall task exited 1. And the reason it exited 1 is more worth looking at than the 200s.
Three illusions
One: it blows up during teardown, and in a place you can’t see.
request.allHeaders hangs in the route callback, and in the old implementation the route callback sits outside try. After the queue delay the page is already closed; the callback then gets a closed context, and the rejection it throws goes unhandled—ONS reports TargetClosedError during teardown.
Every business step passed, yet the task still failed. That’s a good thing, but if you just see “the screen came up” and manually mark it green, this blow-up gets swallowed.
Two: the body the debugger hands me may already be evicted or rewritten.
The old approach read response.body() to compute the digest. Two problems:
- It depends on the debugger’s body cache, and large files get evicted. Artemis’s two fonts and RenPy’s three large resources hit this—the body couldn’t be fetched.
- Text responses get decoded. Tyrano has a 1081-byte script that reads as 1078 bytes from the debug interface, and the SHA256 doesn’t match.
The latter is sneakier: it looks like “the source file is broken.”
Three: CF-Cache-Status: HIT is easily mistaken for "genuinely cold."
A HIT only means this object hit at the edge; it doesn’t mean the browser doesn’t have it. The reverse holds too: a new profile can prove the browser is cold, but can’t prove the origin is cold. These are two different “colds,” and conflating them inflates the conclusion.
First, make the queue closeable
The tool’s fix is to track three things separately: route handles, request handles, and completion callbacks each tracked independently. Once the queue is sealed, stop admitting new requests, wait for all in-flight callbacks to finish, then close the context.
The other spot is stopping: on a 429/503, mark in-flight requests as “cancelled by stop” and release the queue accounting—otherwise the browser is closed and the task is still waiting for an requestfinished that will never come.
All of this reproduces locally, so the pre-check became 8 regressions: raw BOM bytes, a 20 MiB large body, no leak from queued requests on close, stop on 429, stop on 503, reject on error digest, reject on uncommitted body, reject on truncated body. Only all-green proceeds to the network.
Take the body from cache chunks, not from the debugger
The digest method changed: read only the raw chunks newly downloaded this round and already committed to the browser cache, at most 64 KiB each, streamed to Node over Playwright’s private IPC, and compute SHA-256 incrementally and independently. Verify the complete flag, contiguous offsets, metadata length, Content-Length when there’s no encoding, and finally compare against the CAS filename.
It isn’t packet capture; it’s an independent re-check of “the bytes the browser actually received”—stated clearly in the receipt, without pretending to be the original network text. The body doesn’t pass through the application server, and doesn’t touch the debug interface’s text.
Missing, uncommitted, digest mismatch, length mismatch—any one fails; no re-download, no importing a backup.
That BOM
Tyrano’s 1081 bytes actually lost not a single byte: the file prefix is ef bb bf, a UTF-8 BOM. Removing those 3 bytes gives exactly 1078, and the SHA256 is exactly equal to the old debug interface’s body digest.
The evidence is in evidence/text-decoding-cause/result.json, with zero CDN requests. The raw cache bytes matched the CAS from the start, so this is a read-path problem, not resource corruption. But it was only pinned down after the tool was fixed and the formal round had run, so before that all I could write was “mechanism not independently proven.”
The formal round
After the changes, rerun: each of the four engines gets its own new profile and a new QA identity, and the zero-cache proof before loading is printed item by item.
- ONS 7 requests / 7 HIT / 9,015,019 bytes
- Artemis 19 / 19 / 65,928,636 bytes
- Tyrano 67 / 67 / 14,453,418 bytes
- RenPy 9 / 9 / 199,018,268 bytes
102 requests total, all 200, all HIT, and all 288,415,341 bytes passed the Node-side SHA-256 and CAS filename comparison one by one. The four subtasks and the overall task exited 0 as raw results, and the four native screens were each checked by eye.
Attention went to two places:
- The previous round’s failure report was not rewritten to pass. Old logs, old exit codes, old evidence all kept; the new result is a new task and a new directory.
- The old round’s 102 cached copies were used only to regress the reader, with the CDN blocked, and don’t count toward cold start.
Crossing to three kernels
(This is part 1 of 2 of the same post.)
After Chromium passed, I expanded to Firefox and WebKit. The scope didn’t grow with it: only first native launch, non-empty frame, normal exit, iframe removal. The screenshots are the title screen and heading; they don’t prove the full story, saves, or the three-engine matrix, and wholeFeatureAccepted is still false.
Even after all three engines passed, the receipt still says this: this is a browser cold start, not a cold cache on the origin site; the time spent on serial rate-limited runs can’t be counted as performance for a normal user launch either.
Wrapping Up
The last tool regression was 8/8, the formal round 4/4. The most useful output was actually those 8 pre-check cases: they turned “the validator is broken” from a probabilistic event into something reproducible in a minute.
Looking back after writing this, all three illusions point to the same problem—the green grew out of something easy to satisfy: a frame appeared, status code 200, HIT. Only by pinning the green back to “this round’s raw bytes” does it mean only what it should mean.
Also, that BOM I found is worth noting: a single string offset can make “the file is broken” and “the read path is broken” look exactly the same. Don’t touch the source file yet.
