test(scroll): de-flake invariant-1 by measuring anchor drift from the DOM#968
Open
mremond wants to merge 2 commits into
Open
test(scroll): de-flake invariant-1 by measuring anchor drift from the DOM#968mremond wants to merge 2 commits into
mremond wants to merge 2 commits into
Conversation
…virt map Retry-absorbed webkit flake persisted because Assertion B derived drift from __fluuxGetVirtOffset: during the re-assert loop that map can report a stale pre-prepend offset for a sustained window while scrollTop already reflects the added batch, yielding a ~2880-3034px phantom drift that isn't on screen. A second trigger was the demo mount blowing the 60s per-test budget on a slow webkit runner. - Measure the anchor row's own getBoundingClientRect().top vs its captured before-position — the layout truth the user sees, which can't go stale like the offset map. waitForAnchorSettled polls that DOM offset until quiet. - Raise the per-test timeout to 120s so slow webkit demo-boot proceeds instead of failing the mount wait (retry no longer needed for that path). - Drop the now-unused virt-offset path; keep the engine-specific tolerance. Full scroll suite 48 passed locally (chromium + webkit); invariant-1 12/12 across repeats.
The DOM-based drift measurement fixed the anchor-drift flake, but invariant-1 still retry-flaked on one run purely at the demo mount: waitForSelector hit its own 45s ceiling when a loaded webkit runner took >45s to boot the bundle + run the stress seeding. The per-test budget is 120s, so lift the mount wait to 90s (leaving ~30s for the body) — a slow boot now proceeds instead of burning a retry. Pure boot-time headroom; no scroll-logic change.
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.
Follow-up to #966. That PR reduced but didn't eliminate the retry-absorbed webkit flake in scroll
invariant-1.Root cause: Assertion B derived drift from
__fluuxGetVirtOffset. During the prepend re-assert loop that offset map can report a stale pre-prepend value for a sustained window whilescrollTopalready reflects the added batch, producing a ~2880–3034px phantom drift that isn't visible on screen. A second trigger was the demo mount blowing the 60s per-test budget on a slow webkit runner.getBoundingClientRect().topvs its captured before-position — the layout truth the user actually sees, which can't go stale like the offset map.waitForAnchorSettledpolls that DOM offset until quiet.Verified locally: full scroll suite 48 passed (chromium + webkit), invariant-1 green across repeats.