Context
Mnemo's #15017 (merged) added DockLayoutAdapter → DockTabSortZone → DragCoordinator (module-scope) → Window. Window is a @singleton that Neo.setupClass instantiates at import, and its construct() touches Neo.currentWorker.on. In the unit env, importing the adapter (for its own specs or any dashboard-classified spec) evaluates this chain before setup()'s Neo.currentWorker stub runs → crash → "No tests found" (the chain is unloadable). Masked at merge by test-scope classification.
Blocks (why this is re-homed + urgent): my #14771 RA-2 falsifier tests (PR #15062) and Euclid's #14771 isolation testing — his cycle-1 review hit the same wall ("Local single-file adapter execution reaches the pre-existing Neo.currentWorker.on setup-order failure before discovery; it cannot validate this runtime plugin in isolation"). Re-homed from Mnemosyne (going dark 2026-07-13) — I'm absorbing it.
Root cause (V-B-A'd on dev)
src/dashboard/DockTabSortZone.mjs:1 — import DragCoordinator (module-scope)
src/manager/DragCoordinator.mjs:3 — import Window
src/manager/Window.mjs:40-45 — construct() → Neo.currentWorker.on({…}); :196 Neo.setupClass(Window) instantiates the singleton at import
test/playwright/setup.mjs:143 — the Neo.currentWorker ??= {…} stub is inside setup() (line 48) → ESM hoists the import chain before setup() runs
Recommended fix — lazy the DragCoordinator dependency
DockTabSortZone uses DragCoordinator only in runtime drag methods (onDragEnd:170, onDragMove:212), never at module/class scope. Make the import lazy: preload in construct/onConstructed (import('../manager/DragCoordinator.mjs').then(m => me.dragCoordinator = m.default)) and use me.dragCoordinator at drag time. This breaks the module-scope chain (importing DockTabSortZone — which the adapter does for its config module: ref — no longer pulls Window at import → the adapter spec loads) while guaranteeing runtime availability (the preload resolves in ms; a drag is a much-later user gesture). The adapter spec imports DockTabSortZone but never constructs it, so the preload never fires in the unit env.
Alternatives weighed: (b) defer Window.construct's currentWorker.on — bigger blast (touches the window-manager runtime); (c) hoist-safe test-infra stub — fragile, spec-import-order-dependent.
Acceptance Criteria
Related
#15017 (the introducing PR) · #14771 / PR #15062 (blocked — my RA-2 tests) · #14591 (whitebox-e2e) · #14772 (cross-window drag recipe). Origin: routed to Mnemo via A2A during #14771 (no ticket then, per the routed-to-owner rule); minted now as the owner goes dark.
Context
Mnemo's #15017 (merged) added
DockLayoutAdapter → DockTabSortZone → DragCoordinator (module-scope) → Window.Windowis a@singletonthatNeo.setupClassinstantiates at import, and itsconstruct()touchesNeo.currentWorker.on. In the unit env, importing the adapter (for its own specs or any dashboard-classified spec) evaluates this chain beforesetup()'sNeo.currentWorkerstub runs → crash → "No tests found" (the chain is unloadable). Masked at merge by test-scope classification.Blocks (why this is re-homed + urgent): my #14771 RA-2 falsifier tests (PR #15062) and Euclid's #14771 isolation testing — his cycle-1 review hit the same wall ("Local single-file adapter execution reaches the pre-existing
Neo.currentWorker.onsetup-order failure before discovery; it cannot validate this runtime plugin in isolation"). Re-homed from Mnemosyne (going dark 2026-07-13) — I'm absorbing it.Root cause (V-B-A'd on
dev)src/dashboard/DockTabSortZone.mjs:1—import DragCoordinator(module-scope)src/manager/DragCoordinator.mjs:3—import Windowsrc/manager/Window.mjs:40-45—construct()→Neo.currentWorker.on({…});:196Neo.setupClass(Window)instantiates the singleton at importtest/playwright/setup.mjs:143— theNeo.currentWorker ??= {…}stub is insidesetup()(line 48) → ESM hoists the import chain beforesetup()runsRecommended fix — lazy the DragCoordinator dependency
DockTabSortZoneusesDragCoordinatoronly in runtime drag methods (onDragEnd:170,onDragMove:212), never at module/class scope. Make the import lazy: preload inconstruct/onConstructed(import('../manager/DragCoordinator.mjs').then(m => me.dragCoordinator = m.default)) and useme.dragCoordinatorat drag time. This breaks the module-scope chain (importingDockTabSortZone— which the adapter does for its configmodule:ref — no longer pullsWindowat import → the adapter spec loads) while guaranteeing runtime availability (the preload resolves in ms; a drag is a much-later user gesture). The adapter spec importsDockTabSortZonebut never constructs it, so the preload never fires in the unit env.Alternatives weighed: (b) defer
Window.construct'scurrentWorker.on— bigger blast (touches the window-manager runtime); (c) hoist-safe test-infra stub — fragile, spec-import-order-dependent.Acceptance Criteria
DockLayoutAdapterspec chain LOADS in the unit env (nocurrentWorker.oncrash / "No tests found"); the adapter spec + #14771 RA-2 falsifiers run.DragCoordinator/Windowreachable from theDockLayoutAdapterimport chain (grep-guard).Related
#15017(the introducing PR) ·#14771/ PR#15062(blocked — my RA-2 tests) ·#14591(whitebox-e2e) ·#14772(cross-window drag recipe). Origin: routed to Mnemo via A2A during #14771 (no ticket then, per the routed-to-owner rule); minted now as the owner goes dark.