Skip to content

test(node-ui): stabilize the flaky WM→SWM promote e2e (60s migration wait)#1462

Closed
Jurij89 wants to merge 2 commits into
mainfrom
fix/wm-swm-promote-e2e-timeout
Closed

test(node-ui): stabilize the flaky WM→SWM promote e2e (60s migration wait)#1462
Jurij89 wants to merge 2 commits into
mainfrom
fix/wm-swm-promote-e2e-timeout

Conversation

@Jurij89

@Jurij89 Jurij89 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Stabilizes the flaky wm-swm-vm-ui-cycle › promotes WM → SWM via the UI and the triples actually migrate real-node devnet e2e test, which currently reddens Kosava: node-ui e2e (Playwright real-node devnet) on main and every open PR branched from it.

It's a timing flake, not a code regression:

  • The promote UI genuinely succeeds — the "No triples were promoted" no-op assertion (the blank-node-DELETE bug guard) passes. The failure is the next step: countRootInSharedMemory > 0 times out at 20 s with Received: 0 (all 3 retries).
  • The WM→SWM store migration lands in oxigraph asynchronously after the promote request is accepted; under a loaded CI devnet (this runs alongside 326 other specs) it can exceed the 20 s poll window, so the assertion races store propagation.
  • Identical code passes and fails across runs (green on branch CI, red on the merge commit / re-runs) — the signature of a flake. The commit window that "introduced" it touches only PCA node-UI, nothing in the promote/SWM/SPARQL path.

Fix: bump the migration-landing poll 20s → 60s with [1000, 2000, 5000] intervals — matching the VM-publish wait already present in the same file (line ~262). Test-only. It does not weaken the assertion: a promote that never migrates still fails (it just gives the async store migration realistic headroom under CI load).

Related

Files changed

File What
packages/node-ui/e2e/specs/devnet/wm-swm-vm-ui-cycle.devnet.spec.ts Migration-landing toPass timeout 20s → 60s ([1000,2000,5000] intervals) + comment on the async SWM-propagation cause.

Test plan

  • CI Kosava: node-ui e2e (Playwright real-node devnet) goes green (the previously-flaky spec passes with the migration allowed to land within 60 s).
  • The rest of the e2e suite (326 specs) stays green — no behavior change, timeout-only.

…wait)

The `wm-swm-vm-ui-cycle › promotes WM → SWM via the UI and the triples
actually migrate` real-node devnet test flakes: the promote UI reports
success (the "No triples were promoted" no-op assertion passes), but the
follow-on `countRootInSharedMemory > 0` check times out at 20s with
Received: 0. The WM→SWM store migration lands in oxigraph asynchronously
after the promote request is accepted, and under a loaded CI devnet it can
exceed the 20s poll window — so the assertion races store propagation rather
than testing the migration.

Same symptom, not code-related: identical code passes and fails across runs
(e.g. green on branch CI, red on the merge commit), and the whole window that
"introduced" it touches only PCA node-UI, nothing in the promote/SWM/SPARQL
path.

Bump the migration-landing poll from 20s → 60s with [1000,2000,5000]
intervals, matching the VM-publish wait already in this same file (line ~262).
Test-only; makes the migration assertion robust to CI store-propagation lag
without weakening it (a promote that never migrates still fails).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M3swmeQGT8WGttaZsp1NQJ
Comment thread packages/node-ui/e2e/specs/devnet/wm-swm-vm-ui-cycle.devnet.spec.ts Outdated
Address the review suggestion: the WM→SWM migration wait and the SWM→VM
publish wait are the same "wait for the async store migration to land in
oxigraph" policy, previously duplicated as an inline 60s literal in both
places. Extract a single `STORE_PROPAGATION_WAIT` constant and use it for
both, so the coupling is enforced in code (not just prose) and the two
propagation waits can't drift.

Kept it a plain object (not `as const`): Playwright's `toPass` expects a
mutable `intervals: number[]`, which a readonly tuple would not satisfy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M3swmeQGT8WGttaZsp1NQJ

@otReviewAgent otReviewAgent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Agent completed this review and found no issues.

@Jurij89

Jurij89 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Closing — this timeout bump does not fix the flake. #1462's own CI failed with the 60s timeout (Received: 0, "Timeout 60000ms exceeded", all 3 retries), which proves the WM→SWM migration intermittently never lands the root in SWM rather than landing late. That's a real store-side intermittent migration failure (not a test/timeout issue), tracked in #1464 for the memory-layer owners. A larger timeout would only mask it.

@Jurij89 Jurij89 closed this Jul 5, 2026
@Jurij89 Jurij89 deleted the fix/wm-swm-promote-e2e-timeout branch July 5, 2026 21:05
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.

2 participants