From 0b8e9866eacb5898cbbc68e98c0085f384fdf262 Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Fri, 20 Mar 2026 07:10:48 -0700 Subject: [PATCH] test: mock embedded runtime setup in compact hooks harness --- .../pi-embedded-runner/compact.hooks.harness.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/agents/pi-embedded-runner/compact.hooks.harness.ts b/src/agents/pi-embedded-runner/compact.hooks.harness.ts index e065b0105b3..eff1c6d7f6e 100644 --- a/src/agents/pi-embedded-runner/compact.hooks.harness.ts +++ b/src/agents/pi-embedded-runner/compact.hooks.harness.ts @@ -252,6 +252,10 @@ export async function loadCompactHooksHarness(): Promise<{ resolveContextEngine: resolveContextEngineMock, })); + vi.doMock("../../plugins/provider-runtime.js", () => ({ + prepareProviderRuntimeAuth: vi.fn(async () => undefined), + })); + vi.doMock("../../process/command-queue.js", () => ({ enqueueCommandInLane: vi.fn((_lane: unknown, task: () => unknown) => task()), })); @@ -375,6 +379,14 @@ export async function loadCompactHooksHarness(): Promise<{ })), })); + vi.doMock("../pi-bundle-mcp-tools.js", () => ({ + createBundleMcpToolRuntime: vi.fn(async () => undefined), + })); + + vi.doMock("../pi-bundle-lsp-runtime.js", () => ({ + createBundleLspToolRuntime: vi.fn(async () => undefined), + })); + vi.doMock("./sandbox-info.js", () => ({ buildEmbeddedSandboxInfo: vi.fn(() => undefined), }));