Skip to content

test(workerd): run the workerd lane under workerd test, with no Miniflare - #2053

Open
oddharsh wants to merge 1 commit into
mainfrom
claude/test-workerd-native
Open

oddharsh wants to merge 1 commit into
mainfrom
claude/test-workerd-native

Conversation

@oddharsh

@oddharsh oddharsh commented Dec 4, 2026

Copy link
Copy Markdown
Owner

test:workerd runs the contract tests of shipped code a second time inside workerd. It booted Miniflare to do that and called dispatchFetch, which needs node's undici, so it was one of the 5 commands gotcha 38 held on node (bun#39247).

It now writes a capnp config for the workerd binary the pinned wrangler resolves and runs workerd test. The harness exports one test entrypoint per file, reads which files to run from a Data module, and prints each file's report as a tagged stdout line. A cache service stands in for the caches.default Miniflare configured by itself; without it 3 photo tests fail on "No Cache was configured". The lane runs under bun, so test:workerd leaves the node list in the quarantine test and in gotcha 38.

One more line was needed before anything ran: on 55de16d the lane failed to bundle, because a contract test reaches oxc-minify and esbuild can't resolve its browser build. It joins HOST_ONLY. Nothing in CI runs this lane, which is how that went unnoticed.

Differential on 55de16d, same staged tree: the Miniflare lane and this one report the same status for all 1,033 tests and print the same tally. The lane still exits 1 there on 2 new differences and 12 stale gaps, which this PR leaves alone; they were the same under Miniflare.

Not covered: the recovery path for a file that crashes workerd or hangs past 120 s never fired, since no file did. The stale count moved between 2 Miniflare runs (6, then 12) from bun's baseline side, so config/workerd-gaps.json needs a look before anyone trusts its stale list. Only ran on macOS arm64.

Measurements

Miniflare lane vs workerd test lane: 1,033 of 1,033 statuses equal
miniflare (node tools/test-workerd.ts at 55de16df, oxc-minify added):
workerd lane: 962 agree, 53 need a host, 16 known gaps, 2 new, 12 stale
workerd test (bun tools/test-workerd.ts):
lane: 168 of 348 test files exercise code from 133 Worker modules
workerd lane: 962 agree, 53 need a host, 16 known gaps, 2 new, 12 stale
per-test diff of the two --json reports: keys 1033 1033, 0 differing
stale lists: identical

Before the cache service, the same diff named exactly 3 tests, all contract-photo-jxl-originals.test.ts, each Error: No Cache was configured.

One run each: 21.3 s on Miniflare, 20.7 s on workerd test

Single runs on the same machine, so no speed claim.

check:fast: lint, format, typecheck clean; 2,052 tests pass

…iflare

test:workerd booted Miniflare and drove dispatchFetch, which held it on node
(gotcha 38, bun#39247). It now writes a capnp config for the binary the
pinned wrangler resolves and runs `workerd test`: the harness exports one test
entrypoint per file and prints each file's report as a tagged stdout line. A
cache service stands in for the caches.default Miniflare configured; without
it 3 photo tests fail on "No Cache was configured". The lane runs under bun.

oxc-minify joins HOST_ONLY: a contract test reaches it, and esbuild could not
resolve its browser build, so the lane failed to bundle on 55de16d before
this change.

Differential on 55de16d, same tree: the Miniflare lane and this one report
the same status for all 1,033 tests and print the same tally (962 agree,
53 host, 16 known, 2 new, 12 stale). The 2 new and 12 stale were already
there under Miniflare.
@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Wire-size diff vs merge base

5700bf4577722d947db3aa81955895ad8d3c048a → a857726d0ffe14d252ed2217c962862b1298a212

Brotli q11, the quality the edge serves. Every number here is deterministic:
an unchanged file produces no row. Advisory — this check fails on nothing.

Client assets

No change. 42 files, 203.00 KiB Brotli total.

Pages

No change. 74 files, 902.00 KiB Brotli total.

Worker bundle

No change. 318.71 KiB gzip.

Dictionary transport

Family dictionary acquisition: no change, 16.24 KiB q11.

pd/: no change. 909 deltas, 1068.28 KiB total.

Head tags vs merge base

No change. 74 documents, every title, description, canonical, robots, og:*, twitter:*, alternate, JSON-LD type and oracle status identical.

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

First paint, layout shift and first byte vs merge base

No page serves a different document, so no changed page was read.
0 page(s) serve a different document.

Pages that serve the same document

3 sampled page(s) with identical bytes on both sides read flat, alone and pooled.

page FCP base FCP HEAD change CLS base CLS HEAD change TTFB base TTFB HEAD change
/serendipity 172 ms 232 ms +60 ms 0.000 0.000 +0.000 13 ms 12 ms -1 ms
/lwe/knots 316 ms 304 ms -20 ms 0.000 0.000 +0.000 11 ms 13 ms 0 ms
/garage/round-trip 244 ms 248 ms +0 ms 0.000 0.000 +0.000 15 ms 13 ms 0 ms
all 3, pooled 252 ms 248 ms +0 ms 0.000 0.000 +0.000 13 ms 13 ms 0 ms
How a change is called moved, and the controls (238 s)

Each change is the median of HEAD minus base over the 9 pairs. It is moved when a sign test puts the split under p 0.05 and the median is at least 16 ms of FCP, 0.005 of CLS or 5 ms of TTFB (tools/lib/paint-diff.ts). TTFB is how long the Worker takes to send a document's headers, timed from Node before each load, since Chrome's emulated latency hides anything under it. Advisory: nothing here fails the PR.

The same-document pages are a slice of the unchanged ones, turned by the HEAD commit so each push reads different ones. Identical bytes make them a placebo: a move there is the runner or the serving path, never the document.

Controls on /__paint-control, HEAD against itself. A planted control must move its own metric; only the unplanted one judges both:

  • nothing planted: FCP -4 ms, CLS +0.000, TTFB 0 ms
  • every stylesheet held 150 ms: FCP +140 ms (moved), CLS +0.000, TTFB +0 ms
  • a 300px block pushed in above the content and each document held 60 ms: FCP +8 ms, CLS +0.026 (moved), TTFB +59 ms (moved)

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
aadhar-sh 287adaa Commit Preview URL

Branch Preview URL
Dec 04 2026, 09:12 PM

This branch has not been deployed

No deployments
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