Repository navigation
Force align test sources with upstream WPT - #52
Merged
Merged
Conversation
commit: |
cowboyd
force-pushed
the
wpt-suite-fixes
branch
from
November 10, 2026 02:01
010345e to
49338ac
Compare
cowboyd
force-pushed
the
wpt-suite-fixes
branch
from
November 10, 2026 02:09
49338ac to
8de8b8d
Compare
cowboyd
marked this pull request as ready for review
November 10, 2026 02:16
5 of 12 tasks
cowboyd
force-pushed
the
wpt-suite-fixes
branch
3 times, most recently
from
November 10, 2026 19:39
38abe65 to
c24229f
Compare
cowboyd
force-pushed
the
wpt-suite-fixes
branch
3 times, most recently
from
November 10, 2026 23:01
d3dfa02 to
21c5728
Compare
cowboyd
force-pushed
the
wpt-suite-fixes
branch
from
November 10, 2026 23:07
21c5728 to
e034764
Compare
jbolda
approved these changes
Nov 10, 2026
While implementing DOM features I noticed the coding agent engaging in the following pathological behaviors: 1. changing the WPT tests in order to accomodate a feature I was adding to the DOM, and allowing it to drift from upstream. 2. Writing its own test cases outside the WPT suite for behavior that was explicitly covered by the WPT 3. Not being sure what exactly each WPT test was supposed to cover. This adds stricter guardrails around what is allowed in the WPT and instructs future agents to respect them. It stipulates that every test file must mirror the upstream path of the source from which it derives. The specific revision of the WPT is in the /WPT_REVISION file. This allows agents to quickly navigate to the source of the test. Furthermore, it strengthens the language to say that the upstream WPT should be followed very closely when adding new tests, or implementing functionality. Then, I had it re-sync with the upstream WPT and ended up with a test suite that is much more faithful to the original implementation. In fact, it got me thinking that once we have HTML parsing as part of our functionality, we can switch to use the upstream tests directly. Select upstream sources and cases with optional include/exclude rules, with explicit includes taking precedence. Remove feature prerequisite gates so each selected case exercises its own supporting operations. Configure global bindings alongside test selection in wpt.config.ts, including factories that resolve bindings for each fresh document.
cowboyd
force-pushed
the
wpt-suite-fixes
branch
from
November 11, 2026 02:48
e034764 to
b99c5e6
Compare
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.
Force align test sources with upstream WPT
While implementing DOM features I noticed the coding agent engaging in the following pathological behaviors:
This adds stricter guardrails around what is allowed in the WPT and instructs future agents to respect them. It stipulates that every adapted test file must mirror its upstream path under
src/wpt, with.tsappended. The suite shares the revision inpackages/web-platform-tests/WPT_REVISION. This allows agents to quickly navigate to the source of the test.Furthermore, it strengthens the language to say that the upstream WPT should be followed very closely when adding new tests, or implementing functionality.
Then, I had it re-sync with the upstream WPT and ended up with a test suite that is much more faithful to the original implementation. In fact, it got me thinking that once we have HTML parsing as part of our functionality, we can switch to use the upstream tests directly via vendoring or via a git submodule.
Replaces feature prerequisite gates with optional
wpt.config.tsselection by upstream source path and case name. Global bindings also live inwpt.config.ts, as an object or a factory for each fresh document. All adapted cases run by default; explicit includes override exclusions. The UI configuration on this base branch explicitly excludes every adapted top-level directory until implementation PRs enable their cases.