3 months ago
1ab18ceThe skills-actions and plugin-actions store tests passed in isolation but
failed in the full desktop suite: earlier test files (e.g. backup-page.test.ts)
register mock.module('../src/lib/desktopCommands', ...) mocks that persist in
the shared bun test process. The leaked getWorkspaceServerStatus reports
{ running: true, url: 'ws://mock' }, so ensureServerRunning treated the fake
per-workspace server URLs (ws://source, ws://secondary, ws://management,
ws://selected) as stale and ran syncWorkspaceServerRunningUrl ->
markWorkspaceThreadsDisconnected, crashing on the threads-less harness state
('get().threads.filter' TypeError) or silently tearing down the fake JSON-RPC
sockets so expected catalog reads never happened.
Fix: the harness now installs its own desktopCommands mock replicating the
real module's bridge-unavailable behavior (status url: null, start/stop
throwing), installed at load and re-pinned in resetSkillPluginActionRuntime so
the second file to run re-establishes it after intervening files re-mock.
Co-authored-by: Max Weinbach <mweinbach@users.noreply.github.com>Parent5912166