The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 22, 17:00 UTC
test(server): tests no longer depend on the host machine (#25001)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Theo Browne committed
Oct 25, 2026 at 13:58 UTC
1a4bb085ce2a03b500fd1d8143999afc0a903777
4 files changed
+14
-4
apps/server/src/cloud/pinnedRuntime.test.ts
+3
-2
@@ -487,14 +487,15 @@ it.layer(NodeServices.layer)("prunePinnedRuntimes", (it) => {
487
const path = yield* Path.Path;
488
const { baseDir, versionsDir } = yield* setup(["1.0.0", "1.1.0"]);
489
const entry = path.join(versionsDir, "1.0.0", "t3");
490
- yield* fs.copyFile("/bin/sleep", entry);
490
+ // Multicall coreutils (Ubuntu's uutils) refuse to run renamed, so copy Node instead.
491
+ yield* fs.copyFile(process.execPath, entry);
492
yield* fs.chmod(entry, 0o755);
493
const link = path.join(baseDir, "t3");
494
yield* fs.symlink(entry, link);
495
// Its argv names only the link, as with `t3 serve` run from PATH. Removing the link after
496
// spawning leaves the process's executable as the only reference.
497
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
497
- yield* spawner.spawn(ChildProcess.make(link, ["30"]));
498
+ yield* spawner.spawn(ChildProcess.make(link, ["-e", "setTimeout(() => {}, 30_000)"]));
499
yield* fs.remove(link);
500
501
const removed = yield* prunePinnedRuntimes({ baseDir, keep: ["2.0.0"] }).pipe(
apps/server/src/provider/acp/AcpSessionRuntime.processTree.test.ts
+1
-1
@@ -165,7 +165,7 @@ describe("terminatePosixOwnedProcessTree", () => {
165
AcpSessionRuntime.resolveLinuxCgroupTargetCommand("grok", scratch, { PATH: undefined }),
166
).toBeUndefined();
167
expect(
168
- AcpSessionRuntime.resolveLinuxCgroupTargetCommand("node", scratch, { PATH: undefined }),
168
+ AcpSessionRuntime.resolveLinuxCgroupTargetCommand("sh", scratch, { PATH: undefined }),
169
).toBeDefined();
170
expect(
171
AcpSessionRuntime.resolveLinuxCgroupTargetCommand("grok", scratch, {
apps/server/src/testUtils/managedServiceEnv.setup.ts
new
+6
@@ -0,0 +1,6 @@
1
+import { SERVICE_LAUNCHER_CONTEXT_ENV } from "../cloud/serviceProtocol.ts";
2
+
3
+// Agents inside a managed T3 service inherit its home and launcher context; CI has neither.
4
+for (const name of ["T3CODE_HOME", "T3_BOOT_SERVICE_UNIT", SERVICE_LAUNCHER_CONTEXT_ENV]) {
5
+ delete process.env[name];
6
+}
apps/server/vite.config.ts
+4
-1
@@ -128,7 +128,10 @@ export default mergeConfig(
128
// Parallel sqlite/git/worktree/orchestration tests introduce load-sensitive flakes.
129
fileParallelism: false,
130
sequence: { sequencer: WeightedShardSequencer },
131
- setupFiles: ["./src/testUtils/gitConfig.setup.ts"],
131
+ setupFiles: [
132
+ "./src/testUtils/gitConfig.setup.ts",
133
+ "./src/testUtils/managedServiceEnv.setup.ts",
134
+ ],
135
hookTimeout: 120_000,
136
testTimeout: 120_000,
137
},