Skip to content

Force align test sources with upstream WPT - #52

Open
cowboyd wants to merge 1 commit into
mainfrom
wpt-suite-fixes
Open

cowboyd wants to merge 1 commit into
mainfrom
wpt-suite-fixes

Conversation

@cowboyd

@cowboyd cowboyd commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Force align test sources with upstream WPT

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 reference, via a comment, the upstream 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 via vendoring or via a git submodule.

@pkg-pr-new

pkg-pr-new Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/bombshell-dev/ui/@clack/ui@52

commit: 8de8b8d

@cowboyd cowboyd changed the title Align DOM compatibility tests with upstream WPT Force align test sources with upstream WPT 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 reference, via a comment, the upstream 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.
@cowboyd
cowboyd marked this pull request as ready for review November 10, 2026 02:16
@cowboyd
cowboyd requested a review from natemoo-re November 10, 2026 04:09
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