Skip to content

workerd parity: build first, raw GET/HEAD-with-body checks, dispatch-only workflow (#868) - #874

Merged
jimhoyd merged 1 commit into
mainfrom
claude/workerd-parity-guard
Sep 28, 2026
Merged

jimhoyd merged 1 commit into
mainfrom
claude/workerd-parity-guard

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Fixes #868 and #861 item 7.

  • Stale build. npm run test:workerd now runs npm run build before the parity script, so it can no longer pass against an out-of-date dist/. Building first costs about 2 s, and a test in test/workflows.test.ts fails if the build step is removed.
  • GET/HEAD with a body. A raw node:net HTTP/1.1 client sends requests fetch refuses to send. For each, both servers must return the expected status with the same headers and body.
    • GET with a body on /requests gets 413.
    • HEAD with a body on /requests gets 405, because the route lists [GET, POST], which excludes HEAD.
    • A scratch /nobody route uses the default GET/HEAD methods with maxBytes: 0. GET and HEAD with a body get 413, and GET with no body gets 200.
  • CI workflow. New .github/workflows/workerd-parity.yml:
    • Triggered only by workflow_dispatch, with contents: read, on ubuntu-latest and Node 26.
    • Takes a wrangler input with an exact default of 4.143.0.
    • Sets WORKERD_PARITY_REQUIRED=1, so a missing Wrangler fails the run instead of skipping it.
    • It is not referenced by ci.yml, so the required gate is unchanged.
  • Docs. docs/CLOUDFLARE.md now records 30 requests and drops the "GET with a body was not sent to workerd" limitation. docs/CI.md lists the workflow under diagnostic workflows.

Evidence (macOS, Node 26)

  • npm run test:workerd: 30/30 identical responses from workerd and Node.
  • npm test: 1128/1128. npm run verify passes.
  • The workflow has not been dispatched on GitHub yet.

🤖 Generated with Claude Code

…add manual workflow (#868)

- npm run test:workerd now runs npm run build first (about 2 s), so the
  comparison can never run against a dist/ older than its sources.
- The parity script sends GET and HEAD with a Content-Length body over a raw
  node:net socket, which fetch refuses: GET to /requests (maxBytes: 0) is 413,
  HEAD there is 405 (not in its methods), and a new default-method /nobody
  route refuses a body on GET and HEAD with 413. Both sides must agree and
  answer the expected status.
- WORKERD_PARITY_REQUIRED=1 turns SKIP into a failure.
- workerd-parity.yml: workflow_dispatch only, read-only, pinned Wrangler
  4.143.0 by default, not called by ci.yml or any required check (#861 item 7).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimhoyd
jimhoyd enabled auto-merge (squash) September 28, 2026 23:38
@jimhoyd
jimhoyd merged commit b654888 into main Sep 28, 2026
29 checks passed
@jimhoyd
jimhoyd deleted the claude/workerd-parity-guard branch September 28, 2026 23:44
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.

test:workerd runs stale dist/ without noticing, and cannot exercise GET-with-body

1 participant