From c1d7d56b71960bca17ce86f8d358445b6135b809 Mon Sep 17 00:00:00 2001 From: "paseo-bot[bot]" <266920839+paseo-bot[bot]@users.noreply.github.com> Date: Sat, 14 Nov 2026 21:00:57 +0000 Subject: [PATCH] Drain agent snapshot writes before replacement-cancel test cleanup (#9707) The "failed replacement cancellation preserves an autonomous running state" test deleted its storage directory while the snapshot write for the "running" state could still be in flight. Under CI load that write lands during rmSync and fails the test with ENOTEMPTY. Flush the manager and storage first, as the neighbouring cleanup tests do. Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 --- packages/server/src/server/agent/agent-manager.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/server/src/server/agent/agent-manager.test.ts b/packages/server/src/server/agent/agent-manager.test.ts index 5df6bd98d..f0064ebb4 100644 --- a/packages/server/src/server/agent/agent-manager.test.ts +++ b/packages/server/src/server/agent/agent-manager.test.ts @@ -8216,6 +8216,8 @@ test("failed replacement cancellation preserves an autonomous running state", as activeForegroundTurnId: null, }); } finally { + await manager.flush(); + await storage.flush(); rmSync(workdir, { recursive: true, force: true }); } });