Repository navigation
workerd parity: build first, raw GET/HEAD-with-body checks, dispatch-only workflow (#868) - #874
Merged
Merged
Conversation
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #868 and #861 item 7.
npm run test:workerdnow runsnpm run buildbefore the parity script, so it can no longer pass against an out-of-datedist/. Building first costs about 2 s, and a test intest/workflows.test.tsfails if the build step is removed.node:netHTTP/1.1 client sends requestsfetchrefuses to send. For each, both servers must return the expected status with the same headers and body./requestsgets 413./requestsgets 405, because the route lists[GET, POST], which excludes HEAD./nobodyroute uses the default GET/HEAD methods withmaxBytes: 0. GET and HEAD with a body get 413, and GET with no body gets 200..github/workflows/workerd-parity.yml:workflow_dispatch, withcontents: read, on ubuntu-latest and Node 26.wranglerinput with an exact default of 4.143.0.WORKERD_PARITY_REQUIRED=1, so a missing Wrangler fails the run instead of skipping it.Evidence (macOS, Node 26)
npm run test:workerd: 30/30 identical responses from workerd and Node.npm test: 1128/1128.npm run verifypasses.🤖 Generated with Claude Code