LearnNewsExamplesServices
Frontmatter
id19246
titleDockCrossWindowWitnessNL's synthetic windows provoke an error the spec does not name
stateClosed
labels
bugaitesting
assigneesneo-opus-grace
createdAtSep 26, 2026, 11:39 AM
updatedAtSep 26, 2026, 12:15 PM
githubUrlhttps://github.com/neomjs/neo/issues/19246
authorneo-opus-grace
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 26, 2026, 12:15 PM

DockCrossWindowWitnessNL's synthetic windows provoke an error the spec does not name

neo-opus-grace
neo-opus-grace commented on Sep 26, 2026, 11:39 AM

Context

test/playwright/e2e/dashboard/DockCrossWindowWitnessNL.spec.mjs has been red since the #18716 worker-error gate (2026-09-15). #17844's census filed it under "teardown into a departed window". At dev a9abb6c1dc (2026-09-26) it is the only one of that class still red. The other five (WindowOps, WorkstationTopologyGroupsNL ×2, WorkstationReclaimEmbodimentNL, SharedWorkerRemoteReplay) pass: 13 passed, 1 failed, headless, --workers=1, runtime root bound. #19061 / #19073 (09-23) settle a rejection whose window departed (worker.Base#onUnhandledRejection → isDeparture).

The Problem

The one remaining red is not a departure. The failure is two page errors:

pageerror: Target worker 'cw-win-a' does not exist.
    at Manager.promiseMessage (src/worker/Manager.mjs:632)
    at Manager.onWorkerMessage (src/worker/Manager.mjs:578)

The harness (examples/dashboard/crossWindowWitness/Harness.mjs) registers synthetic windows (cw-win-a, cw-win-b, cw-root-b-*) with the WindowManager inside one real App Worker. It drives the real DockTabSortZone with windowId: 'cw-win-a'. The gesture leaves and re-enters that window, so TabSortZone#startWindowDrag / #endWindowDrag call Neo.main.addon.DragDrop for cw-win-a.

  • The harness runs dedicated workers (no useSharedWorkers), so the call reaches the page's main thread.
  • There its forward cannot route to a window that never existed, so it replies with the rejection.
  • The rejection is unhandled in the App Worker. Playwright reports a dedicated worker's uncaught error as pageerror, carrying the cloned Error's main-thread stack.

The Architectural Reality

  • worker.Base#isDeparture(reason, windowId) settles only NEO_DEAD_PORT and isWindowDeparted. Its docblock is explicit: "the code alone means 'unreachable', which a window that never existed also is". The engine is right to surface this error.
  • The harness is verification-only. Its synthetic windows are the design (they model two windows in one worker), and the spec's assertions (one transfer, a suppressed local drop, a warmed coordinator, the foreign root untouched) do not depend on the window drags reaching a main thread.
  • test/playwright/fixtures.mjs workerErrors.expect(RegExp) is the gate's named-expectation seam, the disposition #17844 gives its "specs that provoke an error but do not name it" class.

The Fix

DockCrossWindowWitnessNL.spec.mjs names the error its synthetic source window provokes, workerErrors.expect(/Target worker 'cw-win-a' does not exist\./), with one line saying why: the harness's windows are synthetic, so main-thread calls for them are unroutable by construction. No engine change.

Acceptance Criteria

  • The spec passes at the head (headless, --workers=1, runtime root bound); its nine witness assertions are unchanged.
  • The expectation is scoped to cw-win-a: an error for any other window, or any other message, still fails the test.

Out of Scope

  • Engine changes to TabSortZone's fire-and-forget DragDrop calls. A departed window is already settled globally (#19061), and a window that never existed must surface.
  • The rest of #17844's census, refreshed separately on #17844.

Related

#17844 (the census; this reclassifies one of its rows) · #18716 (the gate) · #19061 / #19073 (departure settlement)

Origin Session ID: 81d1894c-d8fd-4192-8350-42e32eb0101e Retrieval Hint: "DockCrossWindowWitnessNL synthetic window cw-win-a Target worker does not exist"

tobiu referenced in commit b24f95b - "test(dashboard): DockCrossWindowWitnessNL names the error its synthetic windows provoke (#19246) (#19249) on Sep 26, 2026, 12:15 PM
tobiu closed this issue on Sep 26, 2026, 12:15 PM