From c729eb3bc6ce0c99116348417b2b27b1e4bca794 Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Tue, 6 Oct 2026 03:09:06 +0800 Subject: [PATCH] test(subagent): preserve the flush result in the failure fixture The gated final-flush fixture awaited the real flush but dropped its boolean return value. The regression ran correctly under Vitest, but the full Host build rejected the mock against Sessions.flush Promise. Return the real flush result after the gate. This retains the observation order and matches the service signature without a cast or altered production behavior. Validation: targeted terminal-capture-failure regression passes; the complete build is rerun after this typing correction. --- packages/subagent/subagent/tests/continuation.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/subagent/subagent/tests/continuation.spec.ts b/packages/subagent/subagent/tests/continuation.spec.ts index 5ccc9c7857..8973498dd6 100644 --- a/packages/subagent/subagent/tests/continuation.spec.ts +++ b/packages/subagent/subagent/tests/continuation.spec.ts @@ -2445,7 +2445,7 @@ describe('continuable review regressions', () => { flushing.resolve(undefined) await releaseFlush.promise } - await flush(session) + return flush(session) }) const failure = new Error('capture failed') const result = started.result.catch((error: unknown) => error)