@devries-cameron20 / t3code Mirror · read-only / commits / 60c9ca0e33
Fork 0

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 24, 21:30 UTC

[codex] Preserve checkpoint repository detection failures (#3360)

Co-authored-by: codex <codex@users.noreply.github.com>

Julius Marminge committed Jun 20, 2026 at 15:55 UTC 60c9ca0e33dcb30c9c8348b37615a10615fc4e5f
2 files changed +24 -4
apps/server/src/checkpointing/CheckpointStore.test.ts
+21
@@ -93,6 +93,27 @@ function buildLargeText(lineCount = 5_000): string {
93 }
94
95 it.layer(TestLayer)("CheckpointStore.layer", (it) => {
96 + describe("isGitRepository", () => {
97 + it.effect("returns false when no Git repository is detected", () =>
98 + Effect.gen(function* () {
99 + const tmp = yield* makeTmpDir();
100 + const checkpointStore = yield* CheckpointStore.CheckpointStore;
101 +
102 + expect(yield* checkpointStore.isGitRepository(tmp)).toBe(false);
103 + }),
104 + );
105 +
106 + it.effect("returns true when a Git repository is detected", () =>
107 + Effect.gen(function* () {
108 + const tmp = yield* makeTmpDir();
109 + yield* initRepoWithCommit(tmp);
110 + const checkpointStore = yield* CheckpointStore.CheckpointStore;
111 +
112 + expect(yield* checkpointStore.isGitRepository(tmp)).toBe(true);
113 + }),
114 + );
115 + });
116 +
117 describe("diffCheckpoints", () => {
118 it.effect("returns full oversized checkpoint diffs without truncation", () =>
119 Effect.gen(function* () {
apps/server/src/checkpointing/CheckpointStore.ts
+3 -4
@@ -115,10 +115,9 @@ export const make = Effect.gen(function* () {
115 });
116
117 const isGitRepository: CheckpointStore["Service"]["isGitRepository"] = (cwd) =>
118 - vcsRegistry.resolve({ cwd, requestedKind: "git" }).pipe(
119 - Effect.map(() => true),
120 - Effect.orElseSucceed(() => false),
121 - );
118 + vcsRegistry
119 + .detect({ cwd, requestedKind: "git" })
120 + .pipe(Effect.map((repository) => repository !== null));
121
122 const captureCheckpoint: CheckpointStore["Service"]["captureCheckpoint"] = Effect.fn(
123 "captureCheckpoint",