Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(acp): preserve Windows shim stdio pipes #30544

MergedElliotDrel(GitHub profile, opens in a new tab)merged 11 commits intomain fromrefs/pull/30544/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 35 additions and 2 deletions.

x
0 of 2 viewed, 2 left
31 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.tsModified
View file
@@ -53,6 +53,7 @@
import * as Scope from "effect/Scope";
import * as TestClock from "effect/testing/TestClock";
import * as ChildProcessSpawner from "effect/process/ChildProcessSpawner";
+import * as ChildProcess from "effect/process/ChildProcess";
import * as EffectAcpErrors from "effect-acp/errors";
import type * as EffectAcpProtocol from "effect-acp/protocol";
import type * as EffectAcpSchema from "effect-acp/compat";
@@ -571,6 +572,36 @@
});
​
+it.effect("detaches owned ACP processes on POSIX hosts but not on Windows", () =>
+ Effect.gen(function* () {
+ for (const [platform, expected] of [
+ ["win32", false],
+ ["linux", true],
+ ] as const) {
+ let detached: boolean | undefined;
+ yield* AcpSessionRuntime.make({
+ spawn: { command: "acp-agent", args: [] },
+ cwd: process.cwd(),
+ clientInfo: { name: "test", version: "1" },
+ ownDetachedProcessGroup: true,
+ processGroupPlatform: platform,
+ }).pipe(
+ Effect.provideService(HostProcess.Platform, platform),
+ Effect.provideService(
+ ChildProcessSpawner.ChildProcessSpawner,