TypeScript
fix(server): turn diffs keep signed commits' files under log.showSignature (#29124)
Alex Southwell581544212894
diff --git a/apps/server/src/checkpointing/CheckpointStore.test.ts b/apps/server/src/checkpointing/CheckpointStore.test.tsindex 2d79ff15d58..c2a72bcf5f0 100644--- a/apps/server/src/checkpointing/CheckpointStore.test.ts+++ b/apps/server/src/checkpointing/CheckpointStore.test.ts@@ -522,5 +522,40 @@ it.layer(layerTest)("CheckpointStore.layer", (it) => {);}),);++ it.effect("keeps paths from signed commits under log.showSignature", () =>+ Effect.gen(function* () {+ const tmp = yield* makeTmpDir();+ yield* initRepoWithCommit(tmp);+ const signingKey = NodePath.join(yield* makeTmpDir("checkpoint-signing-key-"), "key");+ yield* (yield* VcsProcess.VcsProcess).run({+ operation: "CheckpointStore.test.sshKeygen",+ command: "ssh-keygen",+ cwd: tmp,+ args: ["-q", "-t", "ed25519", "-N", "", "-f", signingKey],+ timeoutMs: 10_000,+ });+ yield* git(tmp, ["config", "gpg.format", "ssh"]);+ yield* git(tmp, ["config", "user.signingkey", `${signingKey}.pub`]);+ yield* git(tmp, ["config", "log.showSignature", "true"]);+ const checkpointStore = yield* CheckpointStore.CheckpointStore;+ const threadId = ThreadId.make("checkpoint-authored-paths-signed");+ const refs = {+ cwd: tmp,+ fromCheckpointRef: checkpointRefForThreadTurn(threadId, 0),+ toCheckpointRef: checkpointRefForThreadTurn(threadId, 1),+ };+ yield* checkpointStore.captureCheckpoint({+ cwd: tmp,+ checkpointRef: refs.fromCheckpointRef,+ });+ yield* writeTextFile(NodePath.join(tmp, "kept.txt"), "kept\n");+ yield* git(tmp, ["add", "kept.txt"]);+ yield* git(tmp, ["commit", "-S", "-m", "kept"]);+ yield* checkpointStore.captureCheckpoint({ cwd: tmp, checkpointRef: refs.toCheckpointRef });++ expect(yield* checkpointStore.listAuthoredPaths(refs)).toEqual(new Set(["kept.txt"]));+ }),+ );});});diff --git a/apps/server/src/vcs/GitVcsDriver.ts b/apps/server/src/vcs/GitVcsDriver.tsindex d46c195155f..ac01dc6e228 100644--- a/apps/server/src/vcs/GitVcsDriver.ts+++ b/apps/server/src/vcs/GitVcsDriver.ts@@ -1436,6 +1436,9 @@ export const makeVcsDriverShape = Effect.fn("makeGitVcsDriverShape")(function* (args: ["-c","diff.relative=false",+ // log.showSignature prints verification text into the path list.+ "-c",+ "log.showSignature=false",...args,"--name-only","-z",