Context
Spun out of #18998, which was filed on two worker errors before either had a mechanism. The first — a component reference reaching the VDom worker under a generated id — turned out to be a TreeBuilder identity defect and is repaired in its own PR. This one is the other error, and it is a different mechanism in a different worker:
App Worker: Error: worker.Base#promiseMessage: no live port for destination
"d6f8a94e-abb1-4718-896f-fb9d376f2163" (remoteMethod Neo.main.DomAccess.setBodyCls) — a window closed?
Measured at dev@db3de7d7b5 plus the #18998 repair, headless, --workers=1, NEO_AGENTOS_RUNTIME_ROOT wired: 3 of 3 runs, and with the vdom defect gone it is now the only worker error left in the file. WorkstationFiveBeatNL scenes 4 and 5 fail on it alone, 3/3 at --repeat-each=3.
The Problem
worker.Base#promiseMessage resolves a remote call against a port whose window has closed. The call is Neo.main.DomAccess.setBodyCls — a main-thread DOM write — addressed to a destination that is gone by the time it is delivered.
Scene 4 is "reintegration: whole stack home, commit precedes the vessel self-close". A remote call racing a deliberate window close is precisely that scene's subject, so the two are plausibly the same event seen from the two ends — but that is a hypothesis, not a measurement. What is measured is the error's text, its frequency (3/3), and that no other worker error remains.
The error's own message ends in a question — "a window closed?" — which is the framework guessing at its own cause. A remote call to a closed window is either an ordinary race the sender should tolerate, or a missed teardown that leaves a caller addressing a dead port. The message does not distinguish them, and neither do I yet.
The Architectural Reality
worker.Base#promiseMessage is the App-Worker side of the remote-method bridge; the destination is a window/port id, and Neo.main.DomAccess.setBodyCls is a main-thread writer.
- The error surfaces at all because of @neo-opus-ada's worker-error gate (#18554 / PR #18716):
fixtures.mjs's workerErrors auto-fixture reads mirrored worker errors from the page console and fails any test that did not name the error it provoked. Before that gate this class of error stayed inside the worker's own inspector.
workerErrors.expect(RegExp) exists exactly so a test can declare an error it means to provoke. Neither scene declares this one.
The Fix
Decide which of the two it is, with evidence, and act accordingly:
- An ordinary teardown race — the sender should not address a port it can know is gone, or should tolerate the absence without raising. Repair on the sender side; the scenes then pass without naming anything.
- A missed teardown — something should have unregistered the destination before the call was issued. Repair there.
- A legitimate, unavoidable race the journey deliberately provokes — then the scene NAMES it via
workerErrors.expect(...), and the gate stays as strict as it is. This is the only branch in which the test changes rather than the engine.
Branch 3 is the one to be suspicious of: it is also the branch that makes the red go away with the least work, which is exactly why it needs the strongest evidence rather than the weakest.
Contract Ledger
| Target surface |
Source of authority |
Behaviour |
Fallback |
Docs |
Evidence |
Viewport#syncBodyTheme's dispatch |
worker.Base#promiseMessage + #isWindowDeparted |
settles silently ONLY when the typed rejection and a recorded departure both hold; anything else reaches the console |
no handler at all was the prior state — an unhandled rejection in the App Worker |
the method's own docblock |
unit: the same typed rejection at departed=true and departed=false, plus a generic-rejection control |
code: 'NEO_DEAD_PORT' |
worker.Base#promiseMessage |
unchanged — attached to every send that resolved no message id |
— |
unchanged |
— |
isWindowDeparted(windowId) |
worker.Base |
unchanged — read, never widened |
— |
unchanged |
— |
the workerErrors gate |
test/playwright/fixtures.mjs (#18554) |
unchanged; no scene-local naming added |
— |
— |
— |
Decision Record impact
none.
Acceptance Criteria
Scope restatement, 2026-09-20 (review RA-2). The two criteria below are not this leaf's to close and are struck rather than carried: this ticket delivers one sender's terminal behaviour, and a whole-journey green depends on #18998's root repair as well. They remain live on their owning artifacts.
WorkstationFiveBeatNL passes whole at a named dev head → owned by #18998 and #17844 jointly; measured contribution of THIS leaf is scene 4, 3/3 red → 3/3 green.
#17844's census row for this file is updated → owned by #17844.
Out of Scope
- The component-reference identity defect (#18998) — repaired separately; this ticket assumes that repair is in.
- The
workerErrors gate's own contract. It is the instrument that made this visible and it is working.
- The
#16756 native-display arm in WorkstationTearOutSourceContinuityNL, dispositioned in #17844.
Avoided Traps
- Reading the scene's narrative as the mechanism. "Commit precedes the vessel self-close" makes a close-race plausible; it does not make it measured. #18998 cost three wrong hypotheses to exactly this habit.
- Taking branch 3 because it is cheap. Naming an error silences it in one line, which is why it must be the conclusion of a measurement rather than a shortcut past one.
Related
#18998 (the other half of the same two-error observation) · #18554 / #18716 (the gate) · #17844 (the census) · #16498 (waits on a whole five-beat capture)
Live latest-open sweep: checked the latest 20 open issues at 2026-09-19T21:0xZ; no equivalent found — #18998 is the nearest and this is deliberately spun out of it. A2A in-flight claim sweep: no overlapping claim. Own-assignment sweep: no same-surface hit.
Retrieval Hint: "promiseMessage no live port setBodyCls five-beat scene 4"
Context
Spun out of #18998, which was filed on two worker errors before either had a mechanism. The first — a component reference reaching the VDom worker under a generated id — turned out to be a
TreeBuilderidentity defect and is repaired in its own PR. This one is the other error, and it is a different mechanism in a different worker:Measured at
dev@db3de7d7b5plus the #18998 repair, headless,--workers=1,NEO_AGENTOS_RUNTIME_ROOTwired: 3 of 3 runs, and with the vdom defect gone it is now the only worker error left in the file.WorkstationFiveBeatNLscenes 4 and 5 fail on it alone, 3/3 at--repeat-each=3.The Problem
worker.Base#promiseMessageresolves a remote call against a port whose window has closed. The call isNeo.main.DomAccess.setBodyCls— a main-thread DOM write — addressed to a destination that is gone by the time it is delivered.Scene 4 is "reintegration: whole stack home, commit precedes the vessel self-close". A remote call racing a deliberate window close is precisely that scene's subject, so the two are plausibly the same event seen from the two ends — but that is a hypothesis, not a measurement. What is measured is the error's text, its frequency (3/3), and that no other worker error remains.
The error's own message ends in a question — "a window closed?" — which is the framework guessing at its own cause. A remote call to a closed window is either an ordinary race the sender should tolerate, or a missed teardown that leaves a caller addressing a dead port. The message does not distinguish them, and neither do I yet.
The Architectural Reality
worker.Base#promiseMessageis the App-Worker side of the remote-method bridge; the destination is a window/port id, andNeo.main.DomAccess.setBodyClsis a main-thread writer.fixtures.mjs'sworkerErrorsauto-fixture reads mirrored worker errors from the page console and fails any test that did not name the error it provoked. Before that gate this class of error stayed inside the worker's own inspector.workerErrors.expect(RegExp)exists exactly so a test can declare an error it means to provoke. Neither scene declares this one.The Fix
Decide which of the two it is, with evidence, and act accordingly:
workerErrors.expect(...), and the gate stays as strict as it is. This is the only branch in which the test changes rather than the engine.Branch 3 is the one to be suspicious of: it is also the branch that makes the red go away with the least work, which is exactly why it needs the strongest evidence rather than the weakest.
Contract Ledger
Viewport#syncBodyTheme's dispatchworker.Base#promiseMessage+#isWindowDeparteddeparted=trueanddeparted=false, plus a generic-rejection controlcode: 'NEO_DEAD_PORT'worker.Base#promiseMessageisWindowDeparted(windowId)worker.BaseworkerErrorsgatetest/playwright/fixtures.mjs(#18554)Decision Record impact
none.Acceptance Criteria
promiseMessageattachescode: 'NEO_DEAD_PORT'to any send that resolved no message id, andisWindowDeparted(windowId)is the separate evidence that a departure was recorded. The measurement was which side of that pairing this caller sat on: neither.src/already own this outcome; two of them (tab/plugin/Overflow,manager/DomEvent) gate on the recorded departure and three on the code alone. The count established the owner; the docblock established the gate.pageerrorhandler is reintroduced to print instead of assert. — MET vacuously: branch 3 was not taken, and nothing in the gate changed.Scope restatement, 2026-09-20 (review RA-2). The two criteria below are not this leaf's to close and are struck rather than carried: this ticket delivers one sender's terminal behaviour, and a whole-journey green depends on #18998's root repair as well. They remain live on their owning artifacts.
→ owned by #18998 and #17844 jointly; measured contribution of THIS leaf is scene 4, 3/3 red → 3/3 green.WorkstationFiveBeatNLpasses whole at a nameddevhead#17844's census row for this file is updated→ owned by #17844.Out of Scope
workerErrorsgate's own contract. It is the instrument that made this visible and it is working.#16756native-display arm inWorkstationTearOutSourceContinuityNL, dispositioned in #17844.Avoided Traps
Related
#18998 (the other half of the same two-error observation) · #18554 / #18716 (the gate) · #17844 (the census) · #16498 (waits on a whole five-beat capture)
Live latest-open sweep: checked the latest 20 open issues at 2026-09-19T21:0xZ; no equivalent found — #18998 is the nearest and this is deliberately spun out of it. A2A in-flight claim sweep: no overlapping claim. Own-assignment sweep: no same-surface hit.
Retrieval Hint:
"promiseMessage no live port setBodyCls five-beat scene 4"