From 4f6c4ddf1c3777c640dfeb4eee62a393405578ba Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Thu, 27 Aug 2026 19:27:05 -0400 Subject: [PATCH] test(core): guarantee execution scope cleanup (#45740) --- packages/core/test/session-execution.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/core/test/session-execution.test.ts b/packages/core/test/session-execution.test.ts index 550103f0813..edd2d667585 100644 --- a/packages/core/test/session-execution.test.ts +++ b/packages/core/test/session-execution.test.ts @@ -85,6 +85,7 @@ describe("SessionExecution lifecycle", () => { const completedRunning = yield* Deferred.make() const release = yield* Deferred.make() const scope = yield* Scope.make() + yield* Effect.addFinalizer(() => Scope.close(scope, Exit.void)) const context = yield* buildExecution(scope, ({ sessionID }) => sessionID === completed ? Deferred.succeed(completedRunning, undefined).pipe(Effect.andThen(Deferred.await(release))) @@ -245,6 +246,7 @@ describe("SessionExecution lifecycle", () => { const bothDraining = yield* Deferred.make() const continued: SessionEvent.Synthetic[] = [] const scope = yield* Scope.make() + yield* Effect.addFinalizer(() => Scope.close(scope, Exit.void)) const context = yield* buildExecution(scope, ({ sessionID }) => Effect.sync(() => { drained.push(sessionID)