@devries-cameron20 / t3code-1 / commits / 070127cbb7
Fork 0

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

test(server): the git-ssh wrapper's fake SSH script is a fixture file, not a generated string (#15480)

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

Yordis Prieto committed Oct 4, 2026 at 00:47 UTC 070127cbb7b4a0a44bab760f59b51829ec349528
2 files changed +10 -15
apps/server/src/vcs/GitVcsDriverCore.test.ts
+3 -15
@@ -2216,7 +2216,9 @@ it.layer(TestLayer)("GitVcsDriver core integration", (it) => {
2216 const fileSystem = yield* FileSystem.FileSystem;
2217 const pathService = yield* Path.Path;
2218 const sshLogPath = pathService.join(tempDir, "ssh-env.txt");
2219 - const sshWrapperPath = pathService.join(tempDir, "ssh-wrapper.sh");
2219 + const sshWrapperPath = yield* pathService.fromFileUrl(
2220 + new URL("./testing/GitVcsDriverCore.fixture.sh", import.meta.url),
2221 + );
2222 const envKeys = [
2223 "GCM_INTERACTIVE",
2224 "GIT_ASKPASS",
@@ -2228,20 +2230,6 @@ it.layer(TestLayer)("GitVcsDriver core integration", (it) => {
2230 ] as const;
2231 const previousEnv = new Map(envKeys.map((key) => [key, process.env[key]]));
2232
2231 - yield* fileSystem.writeFileString(
2232 - sshWrapperPath,
2233 - [
2234 - "#!/bin/sh",
2235 - 'printf "GCM_INTERACTIVE=%s\\n" "${GCM_INTERACTIVE:-}" > "$T3_TEST_SSH_ASKPASS_LOG"',
2236 - 'printf "GIT_ASKPASS=%s\\n" "${GIT_ASKPASS:-}" >> "$T3_TEST_SSH_ASKPASS_LOG"',
2237 - 'printf "GIT_TERMINAL_PROMPT=%s\\n" "${GIT_TERMINAL_PROMPT:-}" >> "$T3_TEST_SSH_ASKPASS_LOG"',
2238 - 'printf "SSH_ASKPASS=%s\\n" "${SSH_ASKPASS:-}" >> "$T3_TEST_SSH_ASKPASS_LOG"',
2239 - 'printf "SSH_ASKPASS_REQUIRE=%s\\n" "${SSH_ASKPASS_REQUIRE:-}" >> "$T3_TEST_SSH_ASKPASS_LOG"',
2240 - "exit 1",
2241 - "",
2242 - ].join("\n"),
2243 - );
2244 - yield* fileSystem.chmod(sshWrapperPath, 0o755);
2233 yield* git(cwd, ["remote", "add", "origin", "ssh://example.invalid/repo.git"]);
2234 yield* git(cwd, ["update-ref", `refs/remotes/origin/${initialBranch}`, "HEAD"]);
2235 yield* git(cwd, ["branch", "--set-upstream-to", `origin/${initialBranch}`]);
apps/server/src/vcs/testing/GitVcsDriverCore.fixture.sh new
+7
@@ -0,0 +1,7 @@
1 +#!/bin/sh
2 +printf "GCM_INTERACTIVE=%s\n" "${GCM_INTERACTIVE:-}" > "$T3_TEST_SSH_ASKPASS_LOG"
3 +printf "GIT_ASKPASS=%s\n" "${GIT_ASKPASS:-}" >> "$T3_TEST_SSH_ASKPASS_LOG"
4 +printf "GIT_TERMINAL_PROMPT=%s\n" "${GIT_TERMINAL_PROMPT:-}" >> "$T3_TEST_SSH_ASKPASS_LOG"
5 +printf "SSH_ASKPASS=%s\n" "${SSH_ASKPASS:-}" >> "$T3_TEST_SSH_ASKPASS_LOG"
6 +printf "SSH_ASKPASS_REQUIRE=%s\n" "${SSH_ASKPASS_REQUIRE:-}" >> "$T3_TEST_SSH_ASKPASS_LOG"
7 +exit 1