@devries-cameron20 / t3code-1 / commits / 6a8f82ca7c
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

test(server): the app-server kill test waits for its stand-in's ready line (#34575)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

yaacovcorcos committed Nov 12, 2026 at 00:43 UTC 6a8f82ca7cc763be2d0814789ee171281cfd92d9
1 file changed +8 -1
apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.ts
+8 -1
@@ -52,6 +52,7 @@ import * as PubSub from "effect/PubSub";
52 import * as Queue from "effect/Queue";
53 import * as Ref from "effect/Ref";
54 import * as Schema from "effect/Schema";
55 +import * as Option from "effect/Option";
56 import * as Stream from "effect/Stream";
57 import * as Sink from "effect/Sink";
58 import * as Stdio from "effect/Stdio";
@@ -10253,7 +10254,13 @@ describe("CodexAdapterV2 app-server process", () => {
10254 } catch {}
10255 };
10256 yield* Effect.addFinalizer(() => Effect.sync(killGroup));
10256 - yield* child.stdout.pipe(Stream.take(1), Stream.runDrain);
10257 + // Stop it only once its SIGTERM trap is set; an early exit would pass without testing it.
10258 + const firstLine = yield* child.stdout.pipe(
10259 + Stream.decodeText(),
10260 + Stream.splitLines,
10261 + Stream.runHead,
10262 + );
10263 + assert.deepStrictEqual(firstLine, Option.some("ready"));
10264 // Scope.close cannot be interrupted, so a regression is ended by this rescue instead of
10265 // hanging the test; the deadline under test must make it unnecessary.
10266 let rescued = false;