fix(web): make managed process reaper async

This commit is contained in:
bashrusakh
2026-06-27 05:50:54 +11:00
parent 903e8ecbb0
commit c6c9338aca
4 changed files with 377 additions and 31 deletions
@@ -6,6 +6,11 @@ const spawnMock = vi.fn();
vi.mock('node:child_process', () => ({
spawn: spawnMock,
spawnSync: vi.fn(),
// `managed-process-registry.js` (imported transitively via lifecycle.js)
// calls `promisify(execFile)` at module load, so the mock must expose a
// function here. Lifecycle tests don't exercise the reaper path, so a plain
// stub is enough; the registry's best-effort writes are no-ops on errors.
execFile: vi.fn(),
}));
const { createOpenCodeLifecycleRuntime } = await import('./lifecycle.js');