Repository navigation
test(web): read crosscheck pages with the clock paused - #1555
Merged
Merged
Conversation
Member
Author
|
[claude-opus-5-5] responding on behalf of okwasniewski For the human: the |
stale-dom rebuilds its list every second; a rebuild between the engine read and the oracle reads made getByRole miss the tagged, detached buttons.
okwasniewski
force-pushed
the
oskar/crosscheck-stale-dom
branch
from
November 5, 2026 08:51
95fe309 to
9be4fdf
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.
The web crosscheck sometimes failed on
benchmark: stale-domwithgetByRole button "Decoy" / "Tap me": ours match, theirs no match(seen on #1552, gone on rerun). It was a race in the harness, not a regression in the engine.stale-domremounts every row on a 1ssetInterval. The crosscheck tags the engine's elements, reads Chrome's AX tree, and then asks Playwright, all on the live page. When a tick landed between those reads, Playwright was asked about tagged buttons that had already been detached.HEAD~4(before fix(e2e): let setInputFiles([]) clear a file input #1546-fix(web): screenshot past a frame whose navigation is held #1551). None of those merges caused it.openCheckPage(packages/web/tests/crosscheck/crosscheck.ts) installs Playwright's clock paused before any document loads. Timers never fire, so the engine and both oracles read the same document. React and Next.js still hydrate (their scheduler usesMessageChannel), andexpected.txtis unchanged.pauseAtthrows on a past time), and CDP virtual time stalled Playwright calls, so the clock is paused from the start.overlay-trapchanged, losing a close button that a 500ms timeout reveals and that was only checked when the timeout beatnetworkidle.list rebuilt every millisecondguards the race. AGENTS.md notes that content revealed by a timer is never read.Verified
Ran it locally: yes
stale-domthroughcrossCheck40 times, random phase, 8x CPU throttle:getByRolemisseschrome unknown/missingon the rebuilt buttons. With it: passes.CROSSCHECK_BENCHMARK_URL): 19/19 passed,expected.txtuntouched.