Skip to content

test(e2e): fix flaky magic wand smooth test on CI WebKit - #2

Merged
bradsec merged 2 commits into
mainfrom
fix/ci-wand-ants-cpu
Oct 29, 2026
Merged

bradsec merged 2 commits into
mainfrom
fix/ci-wand-ants-cpu

Conversation

@bradsec

@bradsec bradsec commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • smooth slider reshapes the current selection outline timed out on the iPad project in CI (runs 40963448224 and 40963421951, job e2e (3)): Timeout 5000ms exceeded while waiting on the predicate. The same code passed on 10dba50, so this is a flake, not the decode change.
  • Cause: the marching-ants selection animation repaints every frame. On CI's software-rendered WebKit with 2 vCPUs this starves the wand worker; the smooth rebuild took 4 to 5 s instead of about 0.5 s. Reproduced in mcr.microsoft.com/playwright:v1.62.1-noble with --cpus=2: 3 of 4 runs failed.
  • Fix: magicwand.spec.mjs runs with contextOptions: { reducedMotion: "reduce" }. The app already stops the ants under reduced motion. Assertions and timeouts are unchanged. A top-level test.use({ reducedMotion }) had no effect in 1.62.1, so it has to go through contextOptions.
  • CI: the failure-artifact upload found nothing because .playwright-artifacts is a hidden folder. Added include-hidden-files: true.

Verification

  • In the CI container with 2 CPUs: the failing test with --repeat-each=10 passed 10/10; magicwand.spec.mjs on both projects with --repeat-each=2 passed 40/40.
  • Full Playwright suite on the host: 259 passed, 1 skipped. npm test: 321 pass.
  • lint, typecheck, format check and cache-buster check are clean.

Not verified

  • Whether the ants animation slows the wand on real low-end devices; this PR changes only the test.

The marching ants animation repaints the selection overlay every frame.
In CI's software-rendered WebKit on 2 vCPUs this starved the wand worker:
the smooth slider rebuild took 4 to 5 s instead of about 0.5 s and the
"smooth slider reshapes the current selection outline" poll hit its 5 s
timeout on iPad. Reduced motion stops the ants; outline geometry and
assertions are unchanged.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Deploying rastertrace with  Cloudflare Pages  Cloudflare Pages

Latest commit: 02ec9b9
Status: ✅  Deploy successful!
Preview URL: https://640b73b9.rastertrace.pages.dev
Branch Preview URL: https://fix-ci-wand-ants-cpu.rastertrace.pages.dev

View logs

@bradsec
bradsec merged commit da5510e into main Oct 29, 2026
7 checks passed
@bradsec
bradsec deleted the fix/ci-wand-ants-cpu branch October 29, 2026 23:47
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