Repository navigation
🤖 tests: pin happy-dom to 20.0.11 so its MutationObserver patch keeps applying - #6361
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Perf clearance (perf owner): cleared at
A new head needs a new clearance. Generated with |
|
Readiness record for head 74c2c9d:
Generated with |
… applying Fixes #6348 --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=high -->
74c2c9d to
0591a75
Compare
|
Perf clearance (perf owner): cleared at the new head
A new head needs a new clearance. Generated with |
Summary
This PR pins
happy-domto20.0.11, the version thatpatches/happy-dom@20.0.11.patch(#6344) names. It also adds a Bun test that fails when happy-dom's MutationObserver stops reporting after a garbage collection. If a later version bump drops the patch, CI fails instead of the #5989 flake coming back silently. Fixes #6348.Background
package.jsonallowed^20.0.10. bun applies apatchedDependenciesentry only while the installed version matches its key, and it says nothing when the key no longer matches. I checked this in a scratch project with the repo's patch, under bun 1.3.12, and again under bun 1.4.3 (main's pin since #6319), with the same result:happy-domin package.jsonbun install20.0.1120.1.0(key stillhappy-dom@20.0.11)So a lockfile update inside the old range brought back the GC flake without any signal.
Implementation
setTimeout. The 20.x and 21.x releases bring many other DOM changes. happy-dom is also a runtime dependency (src/node/services/tools/web_fetch.ts). Upgrading is the larger and riskier change, so I left it out of this PR.src/browser/happyDomMutationObserver.test.ts(Bun unit lane): it observes a node, runs a full GC, appends a child, and expects one batch of records. It checks behavior, not a version string, so an upgrade to a fixed upstream version passes it without the patch.Validation
The guard test, run against each
MutationObserverListener.js:bun install --frozen-lockfileapplies the patch (the installed file matches the 1.3.12 result byte for byte), the guard test passes 3/3 and fails on the unpatched file.make static-checkpassed.bun test ./src/node/services/tools/web_fetch.test.ts ./src/browser/happyDomMutationObserver.test.tspassed.Risks
Low. The installed version does not change (
bun.lockalready resolved 20.0.11). Only the range inpackage.jsonand the workspace entry inbun.lockchange.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high