From 6913e9ce16d54933a329300592f1d3c9e45df4f1 Mon Sep 17 00:00:00 2001 From: mesalogo Date: Tue, 25 Aug 2026 22:30:52 +0800 Subject: [PATCH] fix: stabilize extension startup deadline validation The total-deadline test relied on a timer firing at an exact millisecond boundary, so a shared runner could legally begin the second extension before observing expiration. Use the existing finite synchronous-work fixture to exceed the total budget deterministically while preserving the same production behavior assertion. --- src/main/agent/deepseek-harness-extension-loader.test.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/agent/deepseek-harness-extension-loader.test.ts b/src/main/agent/deepseek-harness-extension-loader.test.ts index 3f010e3c..987e3f29 100644 --- a/src/main/agent/deepseek-harness-extension-loader.test.ts +++ b/src/main/agent/deepseek-harness-extension-loader.test.ts @@ -112,9 +112,10 @@ describe('DeepSeek Harness extension loader', () => { it('bounds the complete extension startup sequence', async () => { const ctx = new Context() - const importModule = vi.fn( - () => new Promise(() => undefined) - ) + const importModule = vi.fn(async () => { + blockEventLoop(25) + return {} + }) const result = await loadControlledHarnessExtensions( ctx,