Skip to content

Commit 6774e4f

Browse files
fix(server): turn diffs keep signed commits' files under log.showSignature
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 30654b3 commit 6774e4f

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

‎apps/server/src/checkpointing/CheckpointStore.test.ts‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,5 +519,40 @@ it.layer(layerTest)("CheckpointStore.layer", (it) => {
519519
);
520520
}),
521521
);
522+
523+
it.effect("keeps paths from signed commits under log.showSignature", () =>
524+
Effect.gen(function* () {
525+
const tmp = yield* makeTmpDir();
526+
yield* initRepoWithCommit(tmp);
527+
const signingKey = NodePath.join(yield* makeTmpDir("checkpoint-signing-key-"), "key");
528+
yield* (yield* VcsProcess.VcsProcess).run({
529+
operation: "CheckpointStore.test.sshKeygen",
530+
command: "ssh-keygen",
531+
cwd: tmp,
532+
args: ["-q", "-t", "ed25519", "-N", "", "-f", signingKey],
533+
timeoutMs: 10_000,
534+
});
535+
yield* git(tmp, ["config", "gpg.format", "ssh"]);
536+
yield* git(tmp, ["config", "user.signingkey", `${signingKey}.pub`]);
537+
yield* git(tmp, ["config", "log.showSignature", "true"]);
538+
const checkpointStore = yield* CheckpointStore.CheckpointStore;
539+
const threadId = ThreadId.make("checkpoint-authored-paths-signed");
540+
const refs = {
541+
cwd: tmp,
542+
fromCheckpointRef: checkpointRefForThreadTurn(threadId, 0),
543+
toCheckpointRef: checkpointRefForThreadTurn(threadId, 1),
544+
};
545+
yield* checkpointStore.captureCheckpoint({
546+
cwd: tmp,
547+
checkpointRef: refs.fromCheckpointRef,
548+
});
549+
yield* writeTextFile(NodePath.join(tmp, "kept.txt"), "kept\n");
550+
yield* git(tmp, ["add", "kept.txt"]);
551+
yield* git(tmp, ["commit", "-S", "-m", "kept"]);
552+
yield* checkpointStore.captureCheckpoint({ cwd: tmp, checkpointRef: refs.toCheckpointRef });
553+
554+
expect(yield* checkpointStore.listAuthoredPaths(refs)).toEqual(new Set(["kept.txt"]));
555+
}),
556+
);
522557
});
523558
});

‎apps/server/src/vcs/GitVcsDriver.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,6 +1436,9 @@ export const makeVcsDriverShape = Effect.fn("makeGitVcsDriverShape")(function* (
14361436
args: [
14371437
"-c",
14381438
"diff.relative=false",
1439+
// log.showSignature prints verification text into the path list.
1440+
"-c",
1441+
"log.showSignature=false",
14391442
...args,
14401443
"--name-only",
14411444
"-z",

0 commit comments

Comments
 (0)