From cf20b969015fd3a819965f86c33c177f53d87fc3 Mon Sep 17 00:00:00 2001 From: Yordis Prieto Date: Sat, 3 Oct 2026 23:45:10 -0400 Subject: [PATCH] fix(server): registry test stubs no longer outlive the test run The fake claude CLI this test spawns kept an unconditional setInterval alive, so when the parent aborts without awaiting the child, the stub process is orphaned and keeps running until the machine reboots. Every run of this suite stranded one more idle node process. Signed-off-by: Yordis Prieto --- .../provider/Layers/ProviderInstanceRegistryLive.test.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/server/src/provider/Layers/ProviderInstanceRegistryLive.test.ts b/apps/server/src/provider/Layers/ProviderInstanceRegistryLive.test.ts index 4d383a7dd16b..1b6f23b08ebc 100644 --- a/apps/server/src/provider/Layers/ProviderInstanceRegistryLive.test.ts +++ b/apps/server/src/provider/Layers/ProviderInstanceRegistryLive.test.ts @@ -223,7 +223,14 @@ const makeTildeProviderFixtures = Effect.fn( " },", ' }) + "\\n");', "});", - "setInterval(() => {}, 1_000);", + "// Stay alive for follow-up control requests, but never outlive the", + "// parent: the probe aborts the SDK without awaiting the child, so an", + "// unconditional interval would strand this process until reboot.", + "const keepAlive = setInterval(() => {}, 1_000);", + 'lines.on("close", () => {', + " clearInterval(keepAlive);", + " process.exit(0);", + "});", "", ].join("\n"), );