Skip to content

test(routes): run routes:check in bare workerd, with no Miniflare - #2055

Open
oddharsh wants to merge 4 commits into
mainfrom
claude/routes-check-workerd
Open

oddharsh wants to merge 4 commits into
mainfrom
claude/routes-check-workerd

Conversation

@oddharsh

@oddharsh oddharsh commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Stacked on #2052: this branch carries its commit, so merge that one first and this diff shrinks to the last commit.

routes:check boots the Worker through wrangler's createTestHarness (Miniflare) on node. Since #2042, validate has also run the same oracle on the same bundle in bare workerd serve. Both route steps were green on all 8 CI runs that had both, and with #2052 the 2 rows serve can't boot alone (/coffee/slots.html, /coffee/pick) pass on a cross-Worker capnp boot with aadhar-counter beside the site.

So routes:check is now the workerd arm, under bun, and validate runs one route step instead of 2. routes:check:workerd goes away as a name.

Two things stay on Miniflare on purpose. routes:check:remote needs Miniflare's proxy to production bindings, which workerd has nothing like. canary-wrangler.ts still boots the candidate wrangler's own harness through check-routes-harness.ts, since that run tests the candidate.

The 4 controls that ran routes:check now run perf-budget first, whose dry run rebuilds .build/public (BUILD_CACHE=0 bun tools/build.ts), and all 4 are caught through the workerd arm.

What CI stops seeing: serve drops Analytics Engine, version metadata, Browser, Images and secrets rather than shimming them, so a route that uses one now runs its fallback in CI where Miniflare ran the bound path. All 421 rows pass either way, but a crash only on the bound path would now reach the post-deploy sweep first. 8 runs of agreement is a short record; it's your call that it's enough. #2053 edits the same gotcha 38 lines and Node list, so whichever merges second gets a conflict I'll resolve. Only ran on macOS arm64.

Measurements

routes:check: 421 rows, 2 known gaps, 2 of 2 pass with aadhar-counter beside the site
workerd serve vs the oracle: 421 rows, 2 known gap(s), 0 new failure(s), 0 stale gap(s); 2 of 2 gap(s) pass with their owning Workers beside the site.
CI, both route steps, every run since #2042 that had both: 8 of 8 agree
8 a local Worker:success | bare workerd:success
bun run controls: 4/4 caught through the workerd routes:check
FAIL  503  /rn/tracks   <- origin-trial is present
CAUGHT        workerd-serve-gap-undeclared (35.8s): NEW    /coffee/pick   <- fails under workerd serve
CAUGHT        workerd-serve-cross-script-unbound (30.1s): FAIL   /coffee/pick   <- fails with its owning Workers beside the site
CAUGHT        served-shell-unminified (38.5s): /nav-tips.js   <- size 11405B > 9076B, 0.8 of src/client/nav-tips.ts
controls: 4/4 caught across 1 checks in 73.8s (clones, 4 at a time); gotchas covered: none
check:fast: lint, format, typecheck clean; 2,062 tests pass

…unter beside the site

workerd serve refuses a Durable Object binding with script_name
(cloudflare/workerd#9023), so /coffee/slots.html and /coffee/pick were gaps
the arm only proved fail. A capnp config can bind a class across Workers in
one process (serviceName), so the arm now boots one: the site bundle with its
vars, KV and Cache API wired as serve wires them, plus aadhar-counter bundled
from counter/wrangler.jsonc, and reruns the gap rows there with VERIFY_ONLY.
Each must pass, so a gap can no longer hide a real failure. Both pass on
0d22871; the new control drops the binding and the arm fails both rows.
routes:check booted the Worker through wrangler's createTestHarness
(Miniflare) on node, and since #2042 a bare `workerd serve` run of the same
oracle sat beside it in validate. Both route steps were green on all 8 CI runs
that had both, and the 2 rows serve cannot boot alone (/coffee/slots.html,
/coffee/pick) pass on the cross-Worker capnp rerun from the commit before.
So routes:check is now that workerd arm, under bun, and validate runs it once.

routes:check:remote stays on Miniflare, the only thing with a proxy to
production bindings, and canary-wrangler.ts still boots the candidate's own
harness through check-routes-harness.ts. The 4 controls that ran routes:check
now run perf-budget first, whose dry run rebuilds .build/public, and all 4
are caught.
@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Wire-size diff vs merge base

24341e0bd0a9b4370c71053fa27091c664300fb6 → 02476e4e5b6214c387fb9334b5aff1fcfb969aa1

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. 889 deltas, 990.84 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.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 4, 2026 •

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 0fcda73 Commit Preview URL

Branch Preview URL
Dec 04 2026, 10:00 PM

@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
/restore 260 ms 256 ms -8 ms 0.000 0.000 +0.000 10 ms 14 ms +4 ms
/lwe/pcrypto 256 ms 268 ms +4 ms 0.000 0.000 +0.000 12 ms 14 ms +1 ms
/garage/workers 216 ms 212 ms +8 ms 0.000 0.000 +0.000 10 ms 11 ms 0 ms
all 3, pooled 244 ms 248 ms +4 ms 0.000 0.000 +0.000 10 ms 13 ms +1 ms
How a change is called moved, and the controls (222 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 -3 ms
  • every stylesheet held 150 ms: FCP +136 ms (moved), CLS +0.000, TTFB +0 ms
  • a 300px block pushed in above the content and each document held 60 ms: FCP +0 ms, CLS +0.026 (moved), TTFB +58 ms (moved)

#2059 moved every inline control into tools/lib/controls/<id>.ts. This
branch's control edits move with them: origin-trial-stamped-on-the-wrong-type
and served-shell-unminified run perf-budget first, workerd-serve-gap-undeclared
calls routes:check, and workerd-serve-cross-script-unbound becomes its own
file. All 4 are caught after the merge.

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