Skip to content

test(routes): rerun the workerd arm's script_name gaps with aadhar-counter beside the site - #2052

Open
oddharsh wants to merge 2 commits into
mainfrom
claude/routes-workerd-cross-script
Open

oddharsh wants to merge 2 commits into
mainfrom
claude/routes-workerd-cross-script

Conversation

@oddharsh

@oddharsh oddharsh commented Dec 4, 2026

Copy link
Copy Markdown
Owner

routes:check:workerd had to declare /coffee/slots.html and /coffee/pick as gaps, because workerd serve refuses COUNTER, a Durable Object binding with script_name (cloudflare/workerd#9023). The arm only proved those 2 rows fail, so a real break in them would have read as the known gap.

A capnp config can bind a class in another Worker in the same process (durableObjectNamespace with serviceName), which is how production binds COUNTER. The arm now boots a second workerd from one: the site bundle with its vars, KV and Cache API wired the way serve's own projection wires them, plus aadhar-counter bundled from counter/wrangler.jsonc. It reruns only the gap rows there (VERIFY_ONLY, new in verify-routes.ts), and each must pass. The serve run and its STALE tripwire are unchanged, so when serve accepts script_name the gaps still come out.

I passed on writing the whole site config as capnp. That would mean re-creating serve's wiring for KV, R2, D1, Workflows, rate limits, cron and assets by hand, for 2 rows. The capnp boot carries only what those rows read. Its KV and cache wiring copies wrangler.rs at v1.20261202.1 and runs on the pinned 1.20261129.1; a workerd bump that changes /workerd/kv.js would fail this boot, loudly.

On 0d22871: 419 of 421 rows pass under serve, and both gaps pass on the cross-Worker boot. A new control drops the COUNTER binding from the capnp and the arm fails both rows. Only ran on macOS arm64.

Measurements

routes:check:workerd: 421 rows, 2 known gaps, 2 of 2 pass with aadhar-counter beside the site
workerd serve (capnp, cross-Worker): booted in 49ms at http://127.0.0.1:58865
PASS  200  /coffee/slots.html
PASS  200  /coffee/pick
2 routes, 0 hard failure(s).

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.
bun run controls workerd-serve: 2/2 caught
CAUGHT        workerd-serve-gap-undeclared (17.4s): NEW    /coffee/pick   <- fails under workerd serve
CAUGHT        workerd-serve-cross-script-unbound (14.8s): FAIL   /coffee/pick   <- fails with its owning Workers beside the site
controls: 2/2 caught across 1 checks in 37.3s (clones, 4 at a time); gotchas covered: none
check:fast: lint, format, typecheck clean; 2,054 tests pass

The 2 new contract tests fail when the binding loses its serviceName and pass with it.

…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.
@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Wire-size diff vs merge base

24341e0bd0a9b4370c71053fa27091c664300fb6 → 142fc9a5fd6c8e416c60848f29d991c6b90dee7e

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.

@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
/around 248 ms 256 ms -4 ms 0.000 0.000 +0.000 13 ms 15 ms +1 ms
/lwe/dac 308 ms 284 ms -16 ms 0.000 0.000 +0.000 15 ms 15 ms +1 ms
/garage/dictionary 268 ms 272 ms +0 ms 0.000 0.000 +0.000 14 ms 13 ms -2 ms
all 3, pooled 276 ms 272 ms -4 ms 0.000 0.000 +0.000 13 ms 14 ms +1 ms
How a change is called moved, and the controls (241 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 +0 ms, CLS +0.000, TTFB -1 ms
  • every stylesheet held 150 ms: FCP +152 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 +57 ms (moved)

#2059 moved every inline control into tools/lib/controls/<id>.ts, so this
branch's workerd-serve-cross-script-unbound control becomes its own file.
Both workerd-serve controls are caught after the merge.
@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 bc2e848 Commit Preview URL

Branch Preview URL
Dec 04 2026, 10: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