Skip to content

test(doop): stabilise shard-4 browser tests (probe wait, 30s poll) (CHE-6913) [squash] - #64

Merged
congvc-bot-x99[bot] merged 6 commits into
agent/tofu/che-5548-2644b627ca4afrom
agent/x99-claude-sonnet/che-6913-d44200bfe43a
Nov 19, 2026
Merged

congvc-bot-x99[bot] merged 6 commits into
agent/tofu/che-5548-2644b627ca4afrom
agent/x99-claude-sonnet/che-6913-d44200bfe43a

Conversation

@congvc-bot-x99

@congvc-bot-x99 congvc-bot-x99 Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Status

Draft. Stacked CHE-6913 fix into the PR #56 branch (base stays the #56 branch; no main merge). Rebased onto PR #56 head e9b8b03f59c6; head is now 5fa6eff730f7. The 6 fix commits keep identical git patch-id --stable before and after the rebase (CHE-7021 test-first waiver is by patch-id and still applies). Earlier head references below (5b555097caeb, e4fa705a0848, e1a03a4ec172) are the pre-rebase commits; their CI evidence does not cover the new head. CI proof on the new head: NOT-RUN until 3 consecutive runs finish.

Change

Head 5b55509 = PR #56 head f22074a + the 30 s waits from PR #57 (45ea29ff3555) + two test-infrastructure changes.

The test change is in tests/pageCanvasBrowser.test.ts, "follows another element link and browser history within the same mounted canvas". After history.back() the test now waits until the element toolbar shows h1, before it navigates to ?frame=target.

The second change is in vite.config.ts: test.expect.poll.timeout is now 30 s. Vitest's default is 1 s. tests/drawingBrowser.test.ts has 28 expect.poll calls that use the default.

Second flake (drawingBrowser)

  • CI run 44092934101 on head 18efbad: test (4) failed with "Hook timed out in 30000ms" in the drawingBrowser beforeEach.
  • Local run on X99 (host load average 41): beforeEach steps goto, harness and tools took 3 to 6 s. One test failed because expect.poll gave up after the 1 s default ("keeps fast layer drags and cancellation correct while doop:move-hit is delayed"). Same file with the 30 s poll default: 83 of 83 passed.
  • The 30 s hook stall in CI is not reproduced. Cause is not isolated beyond "slow page load on a loaded runner".

Cause (observed, not the shared Chromium)

  • The store picks #one first. FrameView's probe effect re-picks #one a few ms later, after the next render.
  • On a slow runner the test navigates in between. focusFrame clears the selection, then the late probe effect picks #one again, with the store at null.
  • The test then waits 30 s for inspectorOpen && !selectedElement and times out.
  • Console log of a failing local run, in page ms: FOCUSFRAME (final, clear) 1882, then PROBEEFFECT pick #one cur= null 1890. In passing runs the probe effect ran at 1864, before the final clear.
  • Failure state dump: page visible, focused, URL ?frame=target, selectedElement still #one. No throttling or hidden page.
  • The race is in the app effect, and a user cannot hit the window by hand. The test is the only reachable caller.

Evidence

Same command for both: taskset -c 10,11 bun run test tests/pageCanvasBrowser.test.ts -t "follows another", 15 runs each, on X99.

  • Red (without the test change): 5 of 15 runs failed.
  • Green (with the test change): 0 of 15 runs failed.
  • Full file, 12 runs with the change: 11 passed 11 of 11. One run failed 2 other tests ("opens links to script-created elements"), a different and unisolated stall at 5 s waits.
  • oxlint and prettier pass on the file.

Blast Radius

Only tests/pageCanvasBrowser.test.ts changes. No app code. A wrong wait makes this one test time out; CI test (3) and test (4) show it.

Proof level: 3 (the browser test ran against the real app locally). CI proof of three consecutive shard-4 passes on this head is NOT-RUN until the runs finish.

Refs CHE-6913

CHE-7020: drawingBrowser beforeEach stall (head e4fa705)

Cause, from a local stall on X99 (readyState complete, harness never set): requestfailed: .../src/lib/cssValues.ts net::ERR_NETWORK_CHANGED, 36 such lines in one stalled run (cssValues.ts, LayerKindIcon.tsx, FlexLayoutControls.tsx, ImageFill.tsx, InteractionsPanel.tsx, ...). Chrome aborts in-flight requests when the host's network interfaces change. Docker files in the same run (compatIsolationDocker.test.ts, 35 s in the CI log) create and drop bridges, which matches the CI stalls (CI network change is inferred, not logged yet). An aborted module import leaves the page loaded and window.drawingHarness unset; no wait recovers. page.goto finishing in 0.5 s fits this.

Fix: loadWithRetry in tests/stepStall.ts loads the fixture again when the harness is not set within 8 s (3 tries), and prints pageerror / requestfailed / readyState on each retry. Test-only change.

Test-first, npx vitest run tests/stepStall.test.ts:

  • Red (stub that loads once): 2 failed | 4 passed (loads again when not ready; throws last error with diagnosis).
  • Green: 5 passed.
  • drawingBrowser.test.ts locally: stall in 2 of 3 runs before the change (stalled > 20000 ms), 0 stalls in 2 runs after. Those 2 runs each had 1 different test-body failure (82 of 83). CI proof of 3 passes on this head: NOT-RUN.

CHE-7021: elementPanelBrowser 5 s waits (head e1a03a4)

tests/elementPanelBrowser.test.ts: new WAIT_MS = 12_000 replaces the 5 s page.setDefaultTimeout and the one { timeout: 5000 } poll. Test-only. 12 s is under the 15 s per-test limit.

Red (weaker evidence, WAIVED, not PASS): run 44129413615, job 134202011472: TimeoutError: Waiting failed: 5000ms exceeded at seedPanel (elementPanelBrowser.test.ts:230), first image-settings test. Not reproducible on demand: local runs pass in 0.5 to 0.7 s unloaded and under CPU contention; two synthetic stalls (busy page thread, slow head stylesheet) stayed green at 5 s, so they were dropped.
Green: local npx vitest run tests/elementPanelBrowser.test.ts 53 of 53. CI run 44210758533 attempts 1, 2, 3 on this head: test (2) and tests success each time.

@congvc-bot-x99 congvc-bot-x99 Bot changed the title test(doop): wait for the element probe before navigating away; S4c shard-4 verification (CHE-6913) [squash] test(doop): stabilise shard-4 browser tests (probe wait, 30s poll) (CHE-6913) [squash] Nov 17, 2026
@congvc-bot-x99 congvc-bot-x99 Bot closed this Nov 18, 2026
@congvc-bot-x99 congvc-bot-x99 Bot reopened this Nov 18, 2026
@congvc-bot-x99
congvc-bot-x99 Bot force-pushed the agent/x99-claude-sonnet/che-6913-d44200bfe43a branch from e1a03a4 to 5fa6eff Compare November 18, 2026 03:43
@congvc-bot-x99
congvc-bot-x99 Bot added this pull request to stack #72 November 18, 2026 04:14
@congvc-dev
congvc-dev force-pushed the agent/x99-claude-sonnet/che-6913-d44200bfe43a branch from 5fa6eff to d3a0ca7 Compare November 18, 2026 04:29
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

congvc-bot[bot] added 6 commits November 18, 2026 21:46
…imports (CHE-7020)

Chrome aborts in-flight requests with net::ERR_NETWORK_CHANGED when host
network interfaces change. The module script in drawing.html then never sets
window.drawingHarness and no wait recovers. Print pageerror/requestfailed/
readyState on a stall and load the page again (3 tries, 8s ready wait).
…E-7021)

The first seedPanel wait timed out at the 5 s puppeteer default on CI shard 2
(run 44129413615, job 134202011472). Widen the file default and the one
explicit 5 s poll to 12 s, under the 15 s per-test limit.
@congvc-bot-x99
congvc-bot-x99 Bot force-pushed the agent/x99-claude-sonnet/che-6913-d44200bfe43a branch from d3a0ca7 to ac5a685 Compare November 18, 2026 14:47
@congvc-bot-x99
congvc-bot-x99 Bot marked this pull request as ready for review November 18, 2026 15:20
@congvc-bot-x99
congvc-bot-x99 Bot merged commit ac5a685 into cheese/main Nov 19, 2026
30 checks passed
@congvc-bot-x99
congvc-bot-x99 Bot deleted the agent/x99-claude-sonnet/che-6913-d44200bfe43a branch November 19, 2026 17:54
congvc-bot-x99 Bot pushed a commit that referenced this pull request Nov 19, 2026
…-6841)

cheese/main carries its own flake fix (doop-design#433) and the ci-policy R1 push-trigger
rule, so the #64 commits are dropped here and the test files take main's
version. Smoke routes gain /api/agent-runners and /api/fonts and follow the
new /api/model-account view.
An error occurred while trying to automatically change base from agent/tofu/che-5548-2644b627ca4a to cheese/main November 23, 2026 09:29
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.

0 participants