test(viewer): the kept pairing written from the marker page, not beside a starting viewer #65

Merged
dawid merged 1 commit from remote-test-flake into main 2026-11-21 08:28:38 +00:00
Owner

main's CI failed once in e2e (run 201): a kept pairing the watch doesn't answer can be forgotten saw three POSTs to the watch instead of two.

The cause is a race in the test. It opened index.html, wrote the kept pairing into IndexedDB, then reloaded. The viewer on the first page, still starting, sometimes read the pairing and sent a hello before the reload. The page after the reload sent its own, so the relay saw hello, hello, bye.

The pairing is now written from markers.html, which is of the same origin but doesn't run the viewer. The test of an ended pairing (410) had the same pattern and gets the same fix.

  • Before: 4 failures in 25 runs, in the CI image (playwright:v1.64.1-noble).
  • After: 0 failures in 40 runs of both tests. The full suite passes (82 tests), and eslint is clean.

🤖 Generated with Claude Code

main's CI failed once in e2e (run 201): *a kept pairing the watch doesn't answer can be forgotten* saw three POSTs to the watch instead of two. The cause is a race in the test. It opened `index.html`, wrote the kept pairing into IndexedDB, then reloaded. The viewer on the first page, still starting, sometimes read the pairing and sent a hello before the reload. The page after the reload sent its own, so the relay saw hello, hello, bye. The pairing is now written from `markers.html`, which is of the same origin but doesn't run the viewer. The test of an ended pairing (410) had the same pattern and gets the same fix. - Before: 4 failures in 25 runs, in the CI image (`playwright:v1.64.1-noble`). - After: 0 failures in 40 runs of both tests. The full suite passes (82 tests), and eslint is clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
test(viewer): the kept pairing written from the marker page, not beside a starting viewer
All checks were successful
CI / checks (pull_request) Successful in 19s
CI / image (pull_request) Successful in 58s
CI / e2e (pull_request) Successful in 4m52s
CI / watch (pull_request) Successful in 3m12s
CI / relay (pull_request) Successful in 55s
CI / android (pull_request) Successful in 7m16s
2668b4722a
The viewer, still starting while the test wrote the pairing into IndexedDB, read it at times and sent a hello before the reload, so the relay saw three POSTs instead of two (main's CI, 4 runs in 25 here). Written from markers.html, of the same origin but without the viewer, it is read only by the page the test opens next.

Tests of CI / e2e: passed

82 passed, 0 failed, 0 skipped (82 tests, 296.6 s)

Of 2668b4722a, the run, updated by every run.

<!-- ci-report tests: CI-e2e --> ### Tests of CI / e2e: passed **82 passed, 0 failed, 0 skipped** (82 tests, 296.6 s) <sub>Of 2668b4722a, [the run](https://git.ciepiela.org/dawid/wristmarkcompanion/actions/runs/202), updated by every run.</sub>

Tests of CI / relay: passed

17 passed, 0 failed, 0 skipped (17 tests, 2.7 s) · coverage 83.5% (+0.0 against main)

Of 2668b4722a, the run, updated by every run.

<!-- ci-report tests: CI-relay --> ### Tests of CI / relay: passed **17 passed, 0 failed, 0 skipped** (17 tests, 2.7 s) · coverage **83.5%** (+0.0 against main) <sub>Of 2668b4722a, [the run](https://git.ciepiela.org/dawid/wristmarkcompanion/actions/runs/202), updated by every run.</sub>
dawid merged commit 3480bc5a67 into main 2026-11-21 08:28:38 +00:00
dawid deleted branch remote-test-flake 2026-11-21 08:28:38 +00:00
Sign in to join this conversation.
No description provided.