Skip to content

fix(e2e): give note-list sync poll 30s headroom for CI runners - #255

Merged
h4yfans merged 1 commit into
mainfrom
fix/e2e-manual-sync-pull-projection
Apr 17, 2026
Merged

fix(e2e): give note-list sync poll 30s headroom for CI runners#255
h4yfans merged 1 commit into
mainfrom
fix/e2e-manual-sync-pull-projection

Conversation

@h4yfans

@h4yfans h4yfans commented Apr 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Manual-sync-smoke (and the body-CRDT same-note merge tests, which use the same helper) timed out in CI shard 2/3 at `note-sync-helpers.ts:101` after the default 10 s `expect.poll` budget. The poll waits for device B's `notes.list({})` to surface the note that device A pushed.

Diagnostic findings

  • Test passes 5/5 locally in 10.8 – 12.3 s end-to-end.
  • The post-sync poll typically resolves in ~100 ms — the note is already in B's index right after `syncBothAndWait` returns with `pendingCount === 0`.
  • The original plan hypothesized a missing `flushProjectionEvents()` or `CREATED` emit in the note-handler markdown insert branch — both already exist (lines 441, 463). No product bug found.
  • CI runners under shard load take materially longer between sync settling and the renderer's IPC reflecting the new row. The 10 s default is too tight for a sync-dependent helper.

Change

No product code changes. No other helpers altered.

Test plan

  • `pnpm exec playwright test manual-sync-smoke.e2e.ts` × 5 — all green
  • CI shard 2/3 confirms the bump unblocks the test under load
  • Body-CRDT tests (which also use `getNoteHandleByTitle`) benefit from the same headroom

Manual-sync-smoke and other CRDT/sync tests were timing out in CI shard
2/3 at note-sync-helpers.ts:101 with the default 10 s expect.poll budget,
even though the underlying sync IS landing the note on device B.

Diagnostic findings:

- Test passes 5/5 locally in 10.8-12.3 s end-to-end.
- The post-sync poll typically resolves in ~100 ms (the note is in B's
  index right after syncBothAndWait returns with pendingCount=0).
- The note-handler insert branch already calls flushProjectionEvents()
  and emits NotesChannels.events.CREATED — no missing wiring.
- CI runners under shard load have been observed to spend >10 s between
  the sync settling and the renderer's window.api.notes.list reflecting
  the new row. This appears to be CI resource pressure rather than a
  product bug.

Fix is minimal: bump the helper's poll budget to 30 s with a comment
explaining why. No product code changed; no other helpers altered.
@h4yfans
h4yfans merged commit aba060e into main Apr 17, 2026
2 checks passed
@h4yfans
h4yfans deleted the fix/e2e-manual-sync-pull-projection branch April 17, 2026 10:28
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