LearnNewsExamplesServices
Frontmatter
id18378
titleDockMaximize.spec''s ghost-id assertion reds on CI without saying which side is still waiting: instrument it, and record what the wait is made of
stateClosed
labels
bug
assigneesneo-opus-vega
createdAtSep 5, 2026, 11:23 PM
updatedAtSep 6, 2026, 2:05 PM
githubUrlhttps://github.com/neomjs/neo/issues/18378
authorneo-opus-vega
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 6, 2026, 2:05 PM

DockMaximize.spec's ghost-id assertion reds on CI without saying which side is still waiting: instrument it, and record what the wait is made of

neo-opus-vega
neo-opus-vega commented on Sep 5, 2026, 11:23 PM

Context

test/playwright/component/dashboard/DockMaximize.spec.mjs › "inside-the-node operations keep maximize, outside operations clear it terminally, and continuity re-applies iff the node survives" is the components job's recurring single red of 2026-09-05: PR #18368's job 101358388937 (19:01Z) and PR #18372's job 101374643467 at b0f3ce2a31 (a failed-only rerun, 101375532404, passed), after an earlier same-shape sighting defect-noted at 16:04Z. 248 other arms pass each time. Closed #18003 was a different failure of the same arm (a valid node with no marker); this one is the opposite half: the markers are gone and the id stays.

The Problem

The arm's last movement sets an unresolvable id and expects the fail-safe to clear it:

await setPlugin(page, {maximizedNodeId: 'ghost-tabs'});
await page.waitForFunction(() => document.querySelectorAll('.neo-dock-maximized').length === 0);
await expect.poll(async () => (await readPlugin(page, ['maximizedNodeId']))[0]).toBe(null)   // :333

On the red runs the count reaches 0 and the poll still reads ghost-tabs after 5 s. In src/dashboard/dock/plugin/Maximize.mjs#afterSetMaximizedNodeId the transition for a new value is one ordered lane: clear the prior presentation, then await me.owner.refreshPromise, then applyPresentation('ghost-tabs'), whose first guard finds no tabs node and calls fail(), which nulls the id. Markers gone with the id retained therefore means the transition is parked between the clear and the apply — at await me.owner.refreshPromise, behind the refresh the arm triggered two lines earlier (the fixture's fire-and-forget refreshCount hook, test/playwright/component/apps/dock-maximize/app.mjs:674; the arm continues on a DOM poll that is satisfied while that refresh is still live).

What the wait is made of (src/dashboard/dock/Workspace.mjs#refreshDockWorkspace, :2857–3010): host.promiseUpdate(), the FLIP captureFirst, releaseStaleRevealPanes, Reconciler.reconcileProjection, plugin.syncDockProjection() (→ applyPresentation('main-tabs', {animate: false}) → measureRect() and await me.play), then afterRefreshDockWorkspace awaiting the refresh's own FLIP played. Every step is a worker ↔ main-thread round trip or a bounded motion window.

Two hypotheses measured and falsified (2026-09-05 22:0xZ, local):

  • An orphaned FLIP window hangs the refresh. DockFlip#play is bounded: each frame wait rides a 100 ms timer dam (#nextFrame), at most 15 frames, plus the token duration + 50 ms — under two seconds even when no frame is ever serviced; play also returns immediately for a hidden document. It cannot hold a wait for five seconds.
  • Uniform slowness on a loaded runner. A probe replaying the arm's exact steps under Chromium CPU throttling (Emulation.setCPUThrottlingRate) measured the ghost id's survival: 20 ms at 1×, 60 ms at 8×, 102 ms at 20×; the refresh settled before the ghost write in every run. The chain is ~100 ms of work at 20× throttle, so a 5 s survival is not slowness — it is a wait for an event that does not arrive in time.

What remains is event-shaped and only observable where it happens. The failing runs' logs are no longer retrievable (the reruns replaced them), and the bare assertion says nothing about which side is pending.

The Architectural Reality

  • afterSetMaximizedNodeId (Maximize.mjs:258) chains transitions on me.transition; fail(nodeId) (:392) nulls the id only when it still equals the transition's node; applyPresentation (:558) awaits measureRect() and me.play before writing; syncDockProjection (:811) is "awaited by the owner's refresh" and its unresolvable branch already avoids the refresh → transition → refresh cycle.
  • The fixture exposes the instruments the diagnosis needs: settleProbeCount (awaits the live refreshPromise, then snapshots settleJson), holdMaximizeClear / releaseMaximizeClearCount, maximizeCycleProbeCount.
  • The fixture documents its refreshCount hook as fire-and-forget because "the continuity arm polls the DOM outcome" — the outcome it polls (one marker) is reached before the refresh settles, so the arm's next write can overlap it. Whether that overlap is the trigger is exactly what the next red must tell.

The Fix

  1. Instrument the assertion, not the timing. The arm's final poll keeps its assertion and its 5 s budget; on failure it bumps the fixture's settle probe and reports whether the live refreshPromise settles within 2 s, plus maximizedNodeId and resizeObserved at failure — the discriminator between "the refresh never settled" and "the transition is parked behind a settled refresh".
  2. When the next CI red carries that line, fix the side it names: a refresh step that does not settle (a parked round trip or reconciler flight — the #18297 class) or a transition wait that outlives a settled refresh; the plugin's rule "truth never waits on motion" and the fixture's overlap are the two candidates, neither yet established.
  3. If no red recurs across a fortnight of components runs with the instrumentation in place, close on that receipt.

Acceptance Criteria

  • AC-1 — The two falsifications above are recorded on this ticket with their receipts, and the arm's final assertion reports the pending side at failure (refreshSettledWithin2s, maximizedNodeId, resizeObserved) while keeping its assertion and budget unchanged.
  • AC-2 — The instrumented arm passes 10 of 10 locally (playwright.config.component.mjs, one worker), quoted in the PR; the other arms of the spec are unchanged.
  • AC-3 — The PR's post-merge validation names the follow-up: the next CI red of this arm carries the diagnosis line, and the fix for the side it names is filed as its own ticket citing this one; a fortnight of components runs without a red is recorded here as the alternative outcome.
  • AC-4 — No committed-operation behaviour changes: the fail-safe clear, the continuity re-apply and the superseding-transition ordering keep their existing arms green.

Out of Scope

  • #18003 (closed): the valid-node-without-marker failure of the same arm.
  • Maximize gestures, geometry or motion.

Related

  • PR #18372 (job 101374643467, rerun 101375532404) and PR #18368 (job 101358388937) — the two reds of 2026-09-05
  • #18003 — the other failure family of this arm
  • #18305 / PR #18324 — the plugin extraction; the plugin's owner decides any plugin-side fix

Live latest-open sweep: latest 12 open issues read at 2026-09-05 21:21Z; no equivalent. A2A claim sweep: Euclid's 21:10Z note routes the observation without claiming a lane; no other claim.

Origin Session ID: 3711ad57-061d-43fb-b1f1-aa9dc21dedda