Skip to content

Update WPT - #7792

Merged
npaun merged 6 commits into
mainfrom
automatic-update-wpt
Oct 16, 2026
Merged

npaun merged 6 commits into
mainfrom
automatic-update-wpt

Conversation

@workers-devprod

Copy link
Copy Markdown
Contributor

This is an automated pull request for updating WPT in workerd.
The WPT update was triaged by an agent using the wpt-update skill (run).

WPT update: wpt-b875b21fd → wpt-2f17dec1f

Final verification: bazel test //src/wpt/... --test_size_filters= --nocache_test_results reports Build completed successfully and Executed 59 out of 59 tests: 59 tests pass. That covers the default and all-autogates variants plus the ESLint and TypeScript checks. tools/cross/format.py --check git and git diff --check are clean.

WPT patch changes

  • patches/wpt/0001-disable-virtualenv-for-serve-command.patch was rebased. Upstream 9ee707c ("Install cryptography for commands that serve tests", #63036) added "requirements": ["requirements.txt"] to the serve entry of tools/serve/commands.json. After that change the patch no longer applied (CONTENT_DOES_NOT_MATCH_TARGET), and every WPT target failed during analysis.
    • tools/wpt/wpt.py asserts that a command with requirements or conditional_requirements uses a virtualenv. The rebased patch therefore removes the new key along with conditional_requirements and still sets "virtualenv": false.
    • The new requirement (cryptography) is only imported by fedcm/support/delegation-issuance.py, which no workerd WPT suite uses.
  • No patches were added, removed or renamed. shared_deps.jsonc and the generated MODULE file are unchanged beyond the bump commit.

Suites

Added (4):

Suite Classification Reason
WebCryptoAPI/export-key-error-order.https.any.js expectedFailures (4 subtests) exportKey() and wrapKey() check extractable before checking export support. HKDF and PBKDF2 keys therefore throw InvalidAccessError (code 15) instead of NotSupportedError (code 9).
WebCryptoAPI/sharedarraybuffer.https.any.js expectedFailures (4 subtests) SubtleCrypto BufferSource arguments accept a Uint8Array backed by a SharedArrayBuffer instead of throwing TypeError. Raw SharedArrayBuffer arguments are already rejected, and those subtests pass.
fetch/api/basic/request-upload-421.any.js expectedFailures (1 subtest), in both fetch/api and fetch/api-ts The 421 retry subtest was moved out of request-upload.any.js, which stays fully disabled. fetch() does not retry a request after a 421 Misdirected Request response: the server reports "Request was sent 1 times. 1 connections were created." The test fails on an assertion and does not affect later tests.
fs/FileSystemBaseHandle-postMessage-insecure-context.https.window.js disabledTests: true Needs window.open(), postMessage and promise_setup. This matches the existing disabled FileSystemBaseHandle-postMessage-*.window.js siblings.

Removed / renamed: none in the mapped directories. The new interfaces/usb.idl, hid.idl and bluetooth*.idl replace webusb.idl, webhid.idl and web-bluetooth*.idl; nothing in workerd references either set. New .html files under dom/events, streams/transferable, encoding/streams/crashtests and fs/resources are not discovered as suites.

Expectations changed in existing suites

  • url/IdnaTestV2.any.js: 7 new expectedFailures. Upstream 13748c3 ("Update IDNA Test JSON to Unicode 18.0.0") changed cases containing U+3E8AC and U+3F8CD from V7 (invalid) to valid ToASCII outputs. ada-url 4.0.0 ships IDNA 17.0.0 tables (external/ada-url+/ada.cpp) and still throws Invalid URL string. The names are written with \u escapes because two pairs differ only by precomposed versus conjoining Hangul jamo.
  • Other changed upstream suites pass unchanged under their existing config:
    • digest/digest.https.any.js and digest.js dropped the transferBeforeCall vectors.
    • encoding/iso-2022-jp-decoder.any.js added decoder reset tests.
    • fetch/api/basic/gc.any.js added FormData GC tests.
    • url/url-setters-stripping.any.js added searchParams tests.
    • websockets/Create-blocked-port.any.js gained timeout=long.
    • streams/writable-streams/crashtests/garbage-collection.any.js added an abort-pending GC test.
  • Default and all-autogates results were identical for every new entry.
  • Disabled and omitted selectors were audited: no array-form disabled or omitted entries exist for any changed upstream suite, and request-upload.any.js stays whole-suite disabled.

Relevant source locations

  • src/workerd/api/crypto/crypto.c++: SubtleCrypto::exportKey and wrapKey (JSG_REQUIRE(key.getExtractable(), DOMInvalidAccessError, ...) runs before key.impl->exportKey).
  • src/workerd/jsg/jsvalue.c++: JsBufferSource (accepts views onto shared buffers); src/workerd/api/crypto/crypto.h (digest/encrypt take jsg::JsBufferSource).
  • external/ada-url+/ada.cpp: IDNA 17.0.0 tables.

Proposed follow-ups (out of scope)

  • WebCrypto export order: in exportKey() and wrapKey(), throw NotSupportedError for algorithms that cannot be exported (HKDF, PBKDF2) before the extractable check. This changes which error type is observable, so it may need a compatibility flag.
  • WebCrypto shared buffers: reject SharedArrayBuffer-backed views in SubtleCrypto BufferSource arguments and dictionary members (they are not [AllowShared]). This is likely compat-flag gated.
  • fetch 421 retry: retry once on a new connection when a request with a body gets a 421 response, per the Fetch HTTP-network-or-cache fetch algorithm.
  • IDNA: update ada-url once it ships Unicode/IDNA 18 tables, then remove the IdnaTestV2.any.js expectations.

Skill update

.opencode/skills/wpt-update/SKILL.md now covers:

  • where to find the old and new WPT archives in Bazel's repository cache after a patch failure;
  • the wpt.py virtualenv/requirements assertion that constrains the serve patch;
  • writing non-NFC subtest names with escapes;
  • how to apply formatting fixes.

🤖 Generated with Claude Code

workers-devprod and others added 5 commits October 16, 2026 20:53
Upstream WPT commit 9ee707c850996c8d124809570c3ff855d67301b9
("Install cryptography for commands that serve tests", #63036) added
a "requirements" key to the serve entry in tools/serve/commands.json.
The patch no longer applied, so every WPT target failed during
analysis with CONTENT_DOES_NOT_MATCH_TARGET.

tools/wpt/wpt.py asserts that a command declaring requirements uses a
virtualenv, so the rebased patch removes the new key together with
conditional_requirements. The new requirement (cryptography) is only
used by fedcm handlers, which no workerd WPT suite exercises.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New suites from the WPT update:

- WebCryptoAPI/export-key-error-order.https.any.js: exportKey() and
  wrapKey() check extractability before export support, so HKDF and
  PBKDF2 keys throw InvalidAccessError instead of NotSupportedError
  (src/workerd/api/crypto/crypto.c++). Marked as expected failures.
- WebCryptoAPI/sharedarraybuffer.https.any.js: raw SharedArrayBuffer
  arguments are rejected, but views onto one are accepted instead of
  throwing TypeError. Marked as expected failures.
- fetch/api/basic/request-upload-421.any.js: the 421 retry subtest
  moved out of request-upload.any.js, which stays disabled. fetch()
  does not retry on 421 Misdirected Request; expected failure in both
  fetch/api and fetch/api-ts configs.
- fs/FileSystemBaseHandle-postMessage-insecure-context.https.window.js
  requires window.open() and postMessage, like its disabled siblings.

Default and all-autogates variants behave identically.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream WPT commit 13748c36fdf9dd77cd0b34dd6b244256b365ea60 updated
url/resources/IdnaTestV2.json to Unicode 18.0.0. Seven ToASCII cases
contain U+3E8AC or U+3F8CD, which were previously unassigned (V7) and
now map to valid labels. ada-url 4.0.0 ships IDNA 17.0.0 tables and
still rejects them, so mark them as expected failures until ada-url
updates its tables.

The names are written with escapes because two cases differ only by
precomposed versus conjoining Hangul jamo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe where Bazel keeps the WPT archives after a failed patch, the
wpt.py virtualenv assertion that constrains the serve patch, how to
keep non-NFC subtest names exact, and how to apply formatting fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@workers-devprod
workers-devprod requested review from a team as code owners October 16, 2026 20:53
@clanky-the-clanker

clanky-the-clanker Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

✅ Approved — No issues found. The rebased WPT patch, the dependency bump and the new expectation entries are consistent with each other.

The decision is advisory: this comment never approves, blocks or requests changes on the pull request.


✅ All checks passed

📋 Code Quality: ✅ LGTM

No issues found.

  • Rebased patch: In patches/wpt/0001-disable-virtualenv-for-serve-command.patch, the hunk header (-4,18 +4,7) matches the hunk body. The patch removes requirements along with conditional_requirements and still sets "virtualenv": false. That is what wpt.py's virtualenv/requirements assertion requires.
  • Dependency bump: freeze_version, sha256, strip_prefix and url match between build/deps/shared_deps.jsonc and the generated build/deps/gen/shared_deps.MODULE.bazel. The patch label changed from //:patches/... to @workerd//:patches/.... The root module is named workerd, so both labels resolve to the same file.
  • WPT expectations: The new expectedFailures and disabledTests entries each have an explanatory comment. The request-upload-421 entry appears in both fetch/api-test.ts and fetch/api-test-ts.ts. The \u escapes in url-test.ts keep subtest names that are not in NFC exactly as upstream writes them.
  • Not checked: These checks are static. The Bazel test results come from the pull request description and were not re-run here.

📝 Documentation: ✅ LGTM

The additions to .opencode/skills/wpt-update/SKILL.md are clear. They cover finding the WPT archives in Bazel's repository cache, the constraint the wpt.py assertion puts on the serve patch, escaping subtest names that are not in NFC, and applying formatting fixes. No issues found.


Reviewed commit: 20dc9dbb

@ask-bonk

ask-bonk Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Since last review: 1 resolved, 0 still open, 0 new.
LGTM!


Reviewed commit: 20dc9dbb · github run

Comment thread src/wpt/url-test.ts
@npaun
npaun enabled auto-merge (squash) October 16, 2026 21:10
The wpt archive's patch was labelled //:patches/wpt/..., which
resolves against the main repository. edgeworker includes
shared_deps.MODULE.bazel, so its builds applied edgeworker's own copy
of the patch, which went stale when the patch was rebased and failed
with CONTENT_DOES_NOT_MATCH_TARGET. Use @workerd//, as build_file
already does, so both builds apply the same patch.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@npaun
npaun merged commit 3e9aa97 into main Oct 16, 2026
28 checks passed
@npaun
npaun deleted the automatic-update-wpt branch October 16, 2026 21:43
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.

2 participants