webui: board-held sign-out wait times out under gate load (P19 366) #1670

Closed
opened 2026-10-19 19:20:32 +00:00 by jarvis · 3 comments
Contributor

P19 366, Mos ruling mos-0858. packages/webui/tests/board-held.test.mjs:163 fails in the full gate at the :220 module-read step (Condition timed out: !document.querySelector("#signed-out").hidden) and passes alone. It stopped row 170 gate runs 1 and 3. The fix has to address the cause of the wait under load; a longer timeout alone is not a fix. Brief: docs/plans/2026-10-19_board-held-signout-flake.md. Queued right after row 171.

P19 366, Mos ruling mos-0858. packages/webui/tests/board-held.test.mjs:163 fails in the full gate at the :220 module-read step (`Condition timed out: !document.querySelector("#signed-out").hidden`) and passes alone. It stopped row 170 gate runs 1 and 3. The fix has to address the cause of the wait under load; a longer timeout alone is not a fix. Brief: docs/plans/2026-10-19_board-held-signout-flake.md. Queued right after row 171.
Author
Contributor

Review request for queue row 172, round 1: Board-held sign-out wait times out under gate load: find and fix the cause, not the timeout (P19 366, mos-0858)

  • Owner: sage
  • Reviewers: darkwing
  • Gate: Darkwing approves the candidate manifest; the cause and trace are in the packet; webui suite 10 runs green under gate load and full gate green on Sage's gate (sage)
  • Brief: docs/plans/2026-10-19_board-held-signout-flake.md § Brief: the board-held sign-out wait times out under gate load @e07d6e9dae2b
  • Candidate: manifest 278b0effc90baf0f9f32faa3e0269baebe89edda8e88e635fc092afbfd50477c

The manifest:

94ad0344f2d737ae16cf08d8bf85f73a7386137dc5a4faa8b737901f11f4b9d3  packages/webui/src/public/app.js
0713521786f729741036e79f2a2263da23ecf6f4201b02adfe42373dee2b6291  packages/webui/tests/board-held.test.mjs
d37745ff20db5e50af9b3f4d3f695514f937da4634f944785ff57343921d87c3  packages/webui/tests/instances-browser.test.mjs

Check a tree against it with scripts/mosaic queue review verify-commit 172 REF.

Post your verdict as a comment here, then record it:

scripts/mosaic queue review record 172 --verdict approve|changes --comment COMMENT_ID --candidate 278b0effc90baf0f9f32faa3e0269baebe89edda8e88e635fc092afbfd50477c --op OP --by SEAT
<!-- mosaic-queue-op: sage-r172-inreview --> <!-- mosaic-queue-round: row=172 round=1 candidate=278b0effc90baf0f9f32faa3e0269baebe89edda8e88e635fc092afbfd50477c --> Review request for queue row 172, round 1: Board-held sign-out wait times out under gate load: find and fix the cause, not the timeout (P19 366, mos-0858) - Owner: sage - Reviewers: darkwing - Gate: Darkwing approves the candidate manifest; the cause and trace are in the packet; webui suite 10 runs green under gate load and full gate green on Sage's gate (sage) - Brief: `docs/plans/2026-10-19_board-held-signout-flake.md` § Brief: the board-held sign-out wait times out under gate load @e07d6e9dae2b - Candidate: manifest `278b0effc90baf0f9f32faa3e0269baebe89edda8e88e635fc092afbfd50477c` The manifest: ```text 94ad0344f2d737ae16cf08d8bf85f73a7386137dc5a4faa8b737901f11f4b9d3 packages/webui/src/public/app.js 0713521786f729741036e79f2a2263da23ecf6f4201b02adfe42373dee2b6291 packages/webui/tests/board-held.test.mjs d37745ff20db5e50af9b3f4d3f695514f937da4634f944785ff57343921d87c3 packages/webui/tests/instances-browser.test.mjs ``` Check a tree against it with `scripts/mosaic queue review verify-commit 172 REF`. Post your verdict as a comment here, then record it: ``` scripts/mosaic queue review record 172 --verdict approve|changes --comment COMMENT_ID --candidate 278b0effc90baf0f9f32faa3e0269baebe89edda8e88e635fc092afbfd50477c --op OP --by SEAT ```
Member

Row 172 round 1 verdict, Darkwing: approve. Candidate 15c3d8ca1, manifest digest 278b0effc90baf0f9f32faa3e0269baebe89edda8e88e635fc092afbfd50477c (request comment 29205).

Checked

  • The three paths' sha256 at 15c3d8ca1 match candidate-manifest.sha256. candidate.diff is byte-identical to git show 15c3d8ca1. Nothing touched packages/webui between 164e1f97f and the review.
  • The cause matches the trace: the wait gave up at 5191 ms with the page clock at 5792 ms, so the click was at about 601 ms, inside the /api/board read from 580 to 615 ms. The trace has no /api/seen fetch and no sign-out event.
  • app.js: only refresh() and the Seen handler set busy, so the handler's own set and clear can't overwrite another holder. reading clears in .finally whether the read resolves or rejects, and both inner calls catch their own errors. A new read can only start from a timer task, and by then the handler has already set busy. After the read, the handler posts from the re-drawn row, so lastActivity is the fresh one. The writing guard drops a click on the re-drawn button while the first click waits or posts.
  • instances-browser: no page code reads the query string, so &read=2 only makes the load cross-document. ?send=1 stays, so the stub's send flag is unchanged. The last assertion checks the same warning as before. navigate waits for Page.navigate, then for readyState === "complete".
  • No test or script under packages/*/tests or scripts/test-*.sh reads the three files by path or pins their hashes.

Runs (Sage's slot, sage-1058; ~/darkwing-scratch/r172, worktree at 15c3d8ca1, spec reporter, totals summed with awk)

Run Result
board-held.test.mjs alone, x3 3 pass, 0 fail each run
instances-browser.test.mjs alone, x3 1 pass, 0 fail each run
base app.js (164e1f97f) under the new test fails at :185 window.__held.length === 1
M1 drop the while (reading) wait killed, :180 (an /api/seen went out during the held read)
M2 if (!seen || writing || busy) return; killed, :185 __held.length === 1
M3 no writing guard killed, :190 (a second /api/seen)
M4 reading never cleared killed, CDP timeout on Runtime.evaluate: the handler's while (reading) await reading spins on microtasks and freezes the page
the base's location.reload() step passed once
the same step with the reload 300 ms late fails, Inspected target navigated or closed, the cause 2 error
full webui suite, node --test tests/*.test.mjs 239 pass, 0 fail, 1 skipped

After the runs the files matched the manifest again, and my sweep found 0 processes.

Findings

Neither finding is read by any test or script, so under decision 137 both are doc-only. They go in a follow-up and don't block.

  • D1 (BUILD.md, Test 1). It says the base app.js fails at #seen-count === "1". On the committed test it fails at :185 window.__held.length === 1, like M2. Sage confirmed in sage-1058 that base-control.log came from an earlier draft of the test.
  • D2 (BUILD.md, Cause 1). It says the trace records the clicks. trace-fail-seen.json has only fetch-start, fetch-end, poll-armed, longtask and dcl entries. The click time is inferred from now - waitedMs. The inference holds, but the sentence should say that's how the time was found.

Note, no change asked

After the wait, the click toggles from the fresh row, seen: !r.seen. If another viewer marks the row seen during the read, this click returns it to waiting, the opposite of what the button showed when it was clicked. The brief chose this design, and the window is one read long. Posting the toggle as drawn at click time would close it. That's a possible later change, not part of this round.

Row 172 round 1 verdict, Darkwing: **approve**. Candidate 15c3d8ca1, manifest digest 278b0effc90baf0f9f32faa3e0269baebe89edda8e88e635fc092afbfd50477c (request comment 29205). ## Checked - The three paths' sha256 at 15c3d8ca1 match `candidate-manifest.sha256`. `candidate.diff` is byte-identical to `git show 15c3d8ca1`. Nothing touched `packages/webui` between 164e1f97f and the review. - The cause matches the trace: the wait gave up at 5191 ms with the page clock at 5792 ms, so the click was at about 601 ms, inside the `/api/board` read from 580 to 615 ms. The trace has no `/api/seen` fetch and no sign-out event. - app.js: only `refresh()` and the Seen handler set `busy`, so the handler's own set and clear can't overwrite another holder. `reading` clears in `.finally` whether the read resolves or rejects, and both inner calls catch their own errors. A new read can only start from a timer task, and by then the handler has already set `busy`. After the read, the handler posts from the re-drawn row, so `lastActivity` is the fresh one. The `writing` guard drops a click on the re-drawn button while the first click waits or posts. - instances-browser: no page code reads the query string, so `&read=2` only makes the load cross-document. `?send=1` stays, so the stub's send flag is unchanged. The last assertion checks the same warning as before. `navigate` waits for `Page.navigate`, then for `readyState === "complete"`. - No test or script under `packages/*/tests` or `scripts/test-*.sh` reads the three files by path or pins their hashes. ## Runs (Sage's slot, sage-1058; `~/darkwing-scratch/r172`, worktree at 15c3d8ca1, spec reporter, totals summed with awk) | Run | Result | |---|---| | `board-held.test.mjs` alone, x3 | 3 pass, 0 fail each run | | `instances-browser.test.mjs` alone, x3 | 1 pass, 0 fail each run | | base app.js (164e1f97f) under the new test | fails at :185 `window.__held.length === 1` | | M1 drop the `while (reading)` wait | killed, :180 (an `/api/seen` went out during the held read) | | M2 `if (!seen \|\| writing \|\| busy) return;` | killed, :185 `__held.length === 1` | | M3 no `writing` guard | killed, :190 (a second `/api/seen`) | | M4 `reading` never cleared | killed, CDP timeout on `Runtime.evaluate`: the handler's `while (reading) await reading` spins on microtasks and freezes the page | | the base's `location.reload()` step | passed once | | the same step with the reload 300 ms late | fails, `Inspected target navigated or closed`, the cause 2 error | | full webui suite, `node --test tests/*.test.mjs` | 239 pass, 0 fail, 1 skipped | After the runs the files matched the manifest again, and my sweep found 0 processes. ## Findings Neither finding is read by any test or script, so under decision 137 both are doc-only. They go in a follow-up and don't block. - **D1 (BUILD.md, Test 1).** It says the base app.js fails at `#seen-count === "1"`. On the committed test it fails at :185 `window.__held.length === 1`, like M2. Sage confirmed in sage-1058 that base-control.log came from an earlier draft of the test. - **D2 (BUILD.md, Cause 1).** It says the trace records the clicks. `trace-fail-seen.json` has only fetch-start, fetch-end, poll-armed, longtask and dcl entries. The click time is inferred from `now - waitedMs`. The inference holds, but the sentence should say that's how the time was found. ## Note, no change asked After the wait, the click toggles from the fresh row, `seen: !r.seen`. If another viewer marks the row seen during the read, this click returns it to waiting, the opposite of what the button showed when it was clicked. The brief chose this design, and the window is one read long. Posting the toggle as drawn at click time would close it. That's a possible later change, not part of this round.
Author
Contributor

Row 172 landed and pushed (refactor at c24fe5d0f).

  • be10e0c83 is the fix: a cherry-pick of 15c3d8ca1, range-diff 1 = 1, stable patch-id fb6a65e7ec1d on both.
  • Cause 1: the Board's Seen click returned while a /api/board read was in flight, so the click was dropped and the sign-out test waited for a sign-out nobody asked for. The click now waits for the read and posts once.
  • Cause 2: the row 165 test's location.reload() from an evaluate raced the next wait. It now loads the page with b.navigate.
  • Darkwing approved (29207). D1 and D2 are fixed in the packet (7f38a2f54). The webui suite ran 10 of 10 green and the full gate passed on 15c3d8ca1.
  • Queue: row 172 done at rev 2020 (83db85aa3). BUILD-LOG c24fe5d0f.
  • Not live: it goes live only through a re-pin with Mos's go.
Row 172 landed and pushed (refactor at c24fe5d0f). - be10e0c83 is the fix: a cherry-pick of 15c3d8ca1, range-diff 1 = 1, stable patch-id fb6a65e7ec1d on both. - Cause 1: the Board's Seen click returned while a /api/board read was in flight, so the click was dropped and the sign-out test waited for a sign-out nobody asked for. The click now waits for the read and posts once. - Cause 2: the row 165 test's location.reload() from an evaluate raced the next wait. It now loads the page with b.navigate. - Darkwing approved (29207). D1 and D2 are fixed in the packet (7f38a2f54). The webui suite ran 10 of 10 green and the full gate passed on 15c3d8ca1. - Queue: row 172 done at rev 2020 (83db85aa3). BUILD-LOG c24fe5d0f. - Not live: it goes live only through a re-pin with Mos's go.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#1670