Context
This is the second v13.3.1 AC-2 roving specimen (cut record #20022; D#19994's AC-2 gate). TearOutMatrixRows4To7NL › "row 7 — post-birth cancel restores the same pane and cleans once" goes red in full e2e/workstation + e2e/dashboard runs: mainRenderCount is 0 where 1 is expected (expectNoTearOutResidue).
- Grace saw it red in full runs: 2 of 3 per the cut record, and "pane not remounted" in her #20017 table.
- Vega's run saw it independently.
- The file is green alone.
Observed (2026-10-23, below): a product defect, not an oracle race. The pane never returns to main's DOM. Inferred, by elimination plus a code read: main's thread applies DOM deltas that belong to the departing vessel window.
The Problem
A post-birth cancel stages Demo B's live CounterPane (neo-component-1) into the vessel popup, then cancels. VesselEmbodiment#restore must put the same pane back into its source slot in main, the Workbench tab body neo-container-5.
In the failing run, main's DOM never gets it back:
- The worker places the pane in main. At the snapshot and 5 s later, the pane reports
windowId = main, mounted: true and mountCount 3, as in a green run.
- Main's DOM doesn't have it.
document.getElementById('neo-component-1') is null for 5 s. The trace's DOM snapshots show neo-container-5 holding the pane until the staging, then empty to the end of the test.
- Main keeps rejecting the pane's own updates. The CounterPane's per-second updates go to main, which logs
insertNodeBatch: Parent not found {parentId: neo-component-1, index: 3} once a second.
The failing sample's flight log. This is a temporary app-worker probe of every vdom flight touching the pane or its slot. Timestamps are on the app-worker clock.
| t (ms) |
flight (window) |
deltas touching the pane or its slot |
| 1150 |
restore(): the pane still sits in the vessel's viewport |
|
| 1165 |
neo-container-5 (main) |
insertNode into neo-container-5 |
| 1168 |
neo-viewport-2 (vessel) |
removeNode neo-component-1 |
| 1198 → |
neo-component-1 (main) |
inserts into the pane; main: "Parent not found" |
In green runs the vessel-viewport flight does not occur.
The pane is gone from main 3 ms after main rendered it. In that window the only delta removing it is the vessel flight's. Only main's own worker.Manager writes main's DOM. So main applied a delta batch computed for another window.
The route (code read):
restore() removes the pane from the vessel's viewport non-silently, so that viewport flies one update for the vessel window.
- The vdom worker replies to
'app' with the request's routing keys (RemoteMethodAccess#assignPort: appName, port, windowId = vessel).
- The vessel's port is gone.
worker.Base#sendMessage relays the reply through any port of the app, which is main's.
- This is intended.
DepartedWindowRouting.spec pins "a reply addressed to a worker still relays through its app when the window it names departed" (#19067 / PR #19074), and dropping the reply would wedge the app worker's flight.
- Main's
Manager#onWorkerMessage holds no promise for that reply id. Its no-promise branch treats any updateVdom / autoMount payload as its own: handleDomUpdate applies the vessel's removeNode to main's DOM and forwards the reply.
Reproduction. Run the row-7 cancel alone with CDP CPU throttling on main (4×) and on the vessel popup (10×). It was red in 2 of 86 runs at that mix. It was 0 of 21 at the others: main 6× alone 0/6, popup 10× alone 0/5, main 6× + popup 20× 0/10. Full-run load hits it far more often, per the counts above.
Not #20017's cause. #20032 parks a Neo.dashboard.dock.Workspace projection into a departed window. Demo B's host is DemoBWorkspace, which extends Neo.container.Base, and an instrumented run recorded no Neo.dashboard.dock.Workspace mount or refresh in the cancel flow.
Grace's #20017 H1 drop probe measured this misroute class in full runs: seven drops, all removeNode of drag proxies for windows that had left, harmless where they landed. Row 7 is the harmful instance.
The Architectural Reality
src/worker/Manager.mjs onWorkerMessage: in the action === 'reply' branch, a reply with no registered promise and an autoMount / updateVdom payload goes to handleDomUpdate(data, deltas, dest, true). That branch never reads data.windowId.
src/worker/Manager.mjs handleDomUpdate: queues the deltas for this window's next frame, then forwards the reply. A failed batch is forwarded as {...originalData, data: {error}, action: 'reply', reject: true}.
src/worker/Base.mjs:
sendMessage's appName step relays a worker-addressed reply through a sibling window. isWindowDeparted(dest) guards only messages addressed to a window.
removePort rejects a departed window's pending promises with name: 'PortDisconnectedError', code: 'NEO_DEAD_PORT'.
src/mixin/VdomLifecycle.mjs: a rejected flight logs vdom update failed unless the error's name is PortDisconnectedError or a caller awaits it.
src/dashboard/dock/window/VesselEmbodiment.mjs restore(): record.pane.parent?.remove(record.pane, false), then silent removeAt / insert into the placeholder's parent and one update().
- Design authority:
DepartedWindowRouting.spec makes the relay intended and calls the window id "only context". No record makes applying a foreign window's deltas intended, and handleDomUpdate's JSDoc describes this window's DOM update.
The Fix
src/worker/Manager.mjs onWorkerMessage. A reply this thread holds no promise for, whose payload carries deltas (updateVdom / autoMount) and whose windowId names another window, is a relay:
- It is not applied here.
- It is forwarded to its destination as a rejection shaped like
removePort's: name: 'PortDisconnectedError', code: 'NEO_DEAD_PORT', plus the windowId. The app worker settles the flight silently, without adopting a vnode no DOM received.
- When
removePort already rejected that promise in the app worker, the forwarded reply finds no entry and is dropped there, as late replies already are.
- Dedicated-worker mode carries no
windowId on replies and keeps today's path.
The same sink guard also refuses an updateVdom message whose destination names another window. That is #20026's class (Grace's suggestion). PR #20027 fixes it at the source; this is the second layer where the DOM is written. A refused updateVdom is answered to its origin with the same rejection, so the sender settles.
The relay in worker.Base#sendMessage stays as #19067 pinned it. The guard is only on the thread that writes the DOM.
Acceptance Criteria
Out of Scope
- Changing the relay in
worker.Base#sendMessage. Dropping a worker-addressed reply would wedge its flight, which is #19067's reason for keeping it.
- Making
VesselEmbodiment#restore remove the pane silently from the vessel. A restore can run while the vessel window is still alive, and that would leave a ghost pane there.
- #20017's warm-reload path (PR #20032).
Related
Live latest-open sweep: checked the latest 20 open issues at 2026-10-23T08:38:00Z; no equivalent found. #20026 is the source-side sibling; this is the sink.
A2A claim sweep (all read-states, last 30): no claim on row 7 besides my lane-intent MESSAGE:1ecc729d. Grace, owner of the #19067 relay, agreed the sink fork in MESSAGE:4aca516e.
MC sweep: "tear-out cancel pane missing from main window DOM after restore, insertNodeBatch Parent not found, main thread applied deltas of another window", 3 results, no prior decision found.
Own-assignment sweep: 7 open, none overlapping.
Origin Session ID: d373d94f-3d91-4a15-a181-4309706acfb5
Retrieval Hint: "relayed vdom reply sibling window applies deltas Manager onWorkerMessage no promise updateVdom foreign windowId tear-out cancel pane missing insertNodeBatch Parent not found"
Context
This is the second v13.3.1 AC-2 roving specimen (cut record #20022; D#19994's AC-2 gate).
TearOutMatrixRows4To7NL› "row 7 — post-birth cancel restores the same pane and cleans once" goes red in fulle2e/workstation+e2e/dashboardruns:mainRenderCountis 0 where 1 is expected (expectNoTearOutResidue).Observed (2026-10-23, below): a product defect, not an oracle race. The pane never returns to main's DOM. Inferred, by elimination plus a code read: main's thread applies DOM deltas that belong to the departing vessel window.
The Problem
A post-birth cancel stages Demo B's live
CounterPane(neo-component-1) into the vessel popup, then cancels.VesselEmbodiment#restoremust put the same pane back into its source slot in main, the Workbench tab bodyneo-container-5.In the failing run, main's DOM never gets it back:
windowId= main,mounted: trueandmountCount3, as in a green run.document.getElementById('neo-component-1')is null for 5 s. The trace's DOM snapshots showneo-container-5holding the pane until the staging, then empty to the end of the test.insertNodeBatch: Parent not found {parentId: neo-component-1, index: 3}once a second.The failing sample's flight log. This is a temporary app-worker probe of every vdom flight touching the pane or its slot. Timestamps are on the app-worker clock.
restore(): the pane still sits in the vessel's viewportneo-container-5(main)insertNodeintoneo-container-5neo-viewport-2(vessel)removeNode neo-component-1neo-component-1(main)In green runs the vessel-viewport flight does not occur.
The pane is gone from main 3 ms after main rendered it. In that window the only delta removing it is the vessel flight's. Only main's own
worker.Managerwrites main's DOM. So main applied a delta batch computed for another window.The route (code read):
restore()removes the pane from the vessel's viewport non-silently, so that viewport flies one update for the vessel window.'app'with the request's routing keys (RemoteMethodAccess#assignPort:appName,port,windowId= vessel).worker.Base#sendMessagerelays the reply through any port of the app, which is main's.DepartedWindowRouting.specpins "a reply addressed to a worker still relays through its app when the window it names departed" (#19067 / PR #19074), and dropping the reply would wedge the app worker's flight.Manager#onWorkerMessageholds no promise for that reply id. Its no-promise branch treats anyupdateVdom/autoMountpayload as its own:handleDomUpdateapplies the vessel'sremoveNodeto main's DOM and forwards the reply.Reproduction. Run the row-7 cancel alone with CDP CPU throttling on main (4×) and on the vessel popup (10×). It was red in 2 of 86 runs at that mix. It was 0 of 21 at the others: main 6× alone 0/6, popup 10× alone 0/5, main 6× + popup 20× 0/10. Full-run load hits it far more often, per the counts above.
Not #20017's cause. #20032 parks a
Neo.dashboard.dock.Workspaceprojection into a departed window. Demo B's host isDemoBWorkspace, which extendsNeo.container.Base, and an instrumented run recorded noNeo.dashboard.dock.Workspacemount or refresh in the cancel flow.Grace's #20017 H1 drop probe measured this misroute class in full runs: seven drops, all
removeNodeof drag proxies for windows that had left, harmless where they landed. Row 7 is the harmful instance.The Architectural Reality
src/worker/Manager.mjsonWorkerMessage: in theaction === 'reply'branch, a reply with no registered promise and anautoMount/updateVdompayload goes tohandleDomUpdate(data, deltas, dest, true). That branch never readsdata.windowId.src/worker/Manager.mjshandleDomUpdate: queues the deltas for this window's next frame, then forwards the reply. A failed batch is forwarded as{...originalData, data: {error}, action: 'reply', reject: true}.src/worker/Base.mjs:sendMessage'sappNamestep relays a worker-addressed reply through a sibling window.isWindowDeparted(dest)guards only messages addressed to a window.removePortrejects a departed window's pending promises withname: 'PortDisconnectedError',code: 'NEO_DEAD_PORT'.src/mixin/VdomLifecycle.mjs: a rejected flight logsvdom update failedunless the error'snameisPortDisconnectedErroror a caller awaits it.src/dashboard/dock/window/VesselEmbodiment.mjsrestore():record.pane.parent?.remove(record.pane, false), then silentremoveAt/insertinto the placeholder's parent and oneupdate().DepartedWindowRouting.specmakes the relay intended and calls the window id "only context". No record makes applying a foreign window's deltas intended, andhandleDomUpdate's JSDoc describes this window's DOM update.The Fix
src/worker/Manager.mjsonWorkerMessage. A reply this thread holds no promise for, whose payload carries deltas (updateVdom/autoMount) and whosewindowIdnames another window, is a relay:removePort's:name: 'PortDisconnectedError',code: 'NEO_DEAD_PORT', plus thewindowId. The app worker settles the flight silently, without adopting a vnode no DOM received.removePortalready rejected that promise in the app worker, the forwarded reply finds no entry and is dropped there, as late replies already are.windowIdon replies and keeps today's path.The same sink guard also refuses an
updateVdommessage whosedestinationnames another window. That is #20026's class (Grace's suggestion). PR #20027 fixes it at the source; this is the second layer where the DOM is written. A refusedupdateVdomis answered to itsoriginwith the same rejection, so the sender settles.The relay in
worker.Base#sendMessagestays as #19067 pinned it. The guard is only on the thread that writes the DOM.Acceptance Criteria
ManagerReplySettlement.specchild-process harness: a promise-less reply with deltas and a foreignwindowIdfires noupdateVdomand is forwarded as aPortDisconnectedErrorrejection. It is red ondev.updateVdomaddressed to another window is refused and answered to its origin. Control: one addressed to this window is applied.Managerleaves main's DOM untouched. It is red ondev, where the element is removed.DepartedWindowRouting.specstays green: the relay is kept.Out of Scope
worker.Base#sendMessage. Dropping a worker-addressed reply would wedge its flight, which is #19067's reason for keeping it.VesselEmbodiment#restoreremove the pane silently from the vessel. A restore can run while the vessel window is still alive, and that would leave a ghost pane there.Related
Live latest-open sweep: checked the latest 20 open issues at 2026-10-23T08:38:00Z; no equivalent found. #20026 is the source-side sibling; this is the sink. A2A claim sweep (all read-states, last 30): no claim on row 7 besides my lane-intent MESSAGE:1ecc729d. Grace, owner of the #19067 relay, agreed the sink fork in MESSAGE:4aca516e. MC sweep: "tear-out cancel pane missing from main window DOM after restore, insertNodeBatch Parent not found, main thread applied deltas of another window", 3 results, no prior decision found. Own-assignment sweep: 7 open, none overlapping.
Origin Session ID: d373d94f-3d91-4a15-a181-4309706acfb5 Retrieval Hint: "relayed vdom reply sibling window applies deltas Manager onWorkerMessage no promise updateVdom foreign windowId tear-out cancel pane missing insertNodeBatch Parent not found"