From e64dde9b2fe440a80d975bb3cef5d302850835ac Mon Sep 17 00:00:00 2001 From: Alex Southwell <4596216+saphid@users.noreply.github.com> Date: Tue, 3 Nov 2026 07:55:54 +1100 Subject: [PATCH 1/4] fix(server): generated commit and PR text ignores git signature output Co-Authored-By: Claude Opus 5.5 --- apps/server/src/git/GitManager.test.ts | 38 ++++++++++++++++++++ apps/server/src/git/GitManager.ts | 2 +- apps/server/src/vcs/GitVcsDriverCore.test.ts | 20 +++++++++-- apps/server/src/vcs/GitVcsDriverCore.ts | 2 +- 4 files changed, 58 insertions(+), 4 deletions(-) diff --git a/apps/server/src/git/GitManager.test.ts b/apps/server/src/git/GitManager.test.ts index 350cb9e8340aa..747fdeda21408 100644 --- a/apps/server/src/git/GitManager.test.ts +++ b/apps/server/src/git/GitManager.test.ts @@ -2564,6 +2564,44 @@ it.layer(layerGitManagerTest)("GitManager", (it) => { }), ); + it.effect("keeps signature output out of recent commit subjects", () => + Effect.gen(function* () { + const repoDir = yield* makeTempDir("t3code-git-manager-"); + yield* initRepo(repoDir); + const signingKey = NodePath.join(yield* makeTempDir("t3code-git-signing-key-"), "key"); + NodeChildProcess.execFileSync("ssh-keygen", [ + "-q", + "-t", + "ed25519", + "-N", + "", + "-f", + signingKey, + ]); + yield* runGit(repoDir, ["config", "gpg.format", "ssh"]); + yield* runGit(repoDir, ["config", "user.signingkey", `${signingKey}.pub`]); + yield* runGit(repoDir, ["config", "log.showSignature", "true"]); + yield* runGit(repoDir, ["commit", "--amend", "-S", "--no-edit"]); + NodeFS.writeFileSync(NodePath.join(repoDir, "README.md"), "hello again\n"); + let commitInstructions: string | undefined; + + const { manager } = yield* makeManager({ + textGeneration: { + generateCommitMessage: (input) => { + commitInstructions = input.policy?.commitInstructions; + return Effect.succeed({ subject: "Update readme", body: "" }); + }, + }, + }); + + yield* runStackedAction(manager, { cwd: repoDir, action: "commit" }); + + expect(commitInstructions).toMatch( + /Recent commit subjects from this repository:\nInitial commit$/, + ); + }), + ); + it.effect("falls back when the dedicated source control writer is unavailable", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); diff --git a/apps/server/src/git/GitManager.ts b/apps/server/src/git/GitManager.ts index 6715f9fd65ed0..4e1c79ffd4a30 100644 --- a/apps/server/src/git/GitManager.ts +++ b/apps/server/src/git/GitManager.ts @@ -791,7 +791,7 @@ export const make = Effect.gen(function* () { .execute({ operation: "GitManager.readRecentCommitSubjects", cwd, - args: ["log", "-n", "20", "--no-merges", "--pretty=format:%s"], + args: ["log", "-n", "20", "--no-merges", "--no-show-signature", "--pretty=format:%s"], }) .pipe( Effect.map((result) => diff --git a/apps/server/src/vcs/GitVcsDriverCore.test.ts b/apps/server/src/vcs/GitVcsDriverCore.test.ts index 9f9d23a8e409b..c843bb88dd0a2 100644 --- a/apps/server/src/vcs/GitVcsDriverCore.test.ts +++ b/apps/server/src/vcs/GitVcsDriverCore.test.ts @@ -2634,7 +2634,7 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => { }), ); - it.effect("reads range patches from source without running textconv", () => + it.effect("reads range patches from source without textconv or signature output", () => Effect.gen(function* () { const cwd = yield* makeTmpDir(); const { initialBranch } = yield* initRepoWithCommit(cwd); @@ -2645,12 +2645,28 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => { yield* writeTextFile(cwd, "plain.txt", "plain line\n"); yield* writeTextFile(cwd, "binary.dat", "binary\0data"); yield* git(cwd, ["add", "."]); - yield* git(cwd, ["commit", "-m", "range files"]); + const signingKey = `${yield* makeTmpDir("git-vcs-driver-signing-key-")}/key`; + const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; + const keygen = ChildProcess.make("ssh-keygen", [ + "-q", + "-t", + "ed25519", + "-N", + "", + "-f", + signingKey, + ]); + assert.equal(Number(yield* spawner.exitCode(keygen)), 0); + yield* git(cwd, ["config", "gpg.format", "ssh"]); + yield* git(cwd, ["config", "user.signingkey", `${signingKey}.pub`]); + yield* git(cwd, ["config", "log.showSignature", "true"]); + yield* git(cwd, ["commit", "-S", "-m", "range files"]); const driver = yield* GitVcsDriver.GitVcsDriver; const fileSystem = yield* FileSystem.FileSystem; const context = yield* driver.readRangeContext(cwd, initialBranch); + assert.match(context.commitSummary.trim(), /^[a-f0-9]+ range files$/); assert.include(context.diffPatch, "+source line"); assert.notInclude(context.diffPatch, "converted"); assert.include(context.diffPatch, "+plain line"); diff --git a/apps/server/src/vcs/GitVcsDriverCore.ts b/apps/server/src/vcs/GitVcsDriverCore.ts index a084664bc447c..01bcbad45eb3b 100644 --- a/apps/server/src/vcs/GitVcsDriverCore.ts +++ b/apps/server/src/vcs/GitVcsDriverCore.ts @@ -2922,7 +2922,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function* runGitStdoutWithOptions( "GitVcsDriver.readRangeContext.log", cwd, - ["log", "--oneline", "--end-of-options", commitRange], + ["log", "--oneline", "--no-show-signature", "--end-of-options", commitRange], { maxOutputBytes: RANGE_COMMIT_SUMMARY_MAX_OUTPUT_BYTES, appendTruncationMarker: true, From d21de09be555bb7400444cd9c92de1659da097fe Mon Sep 17 00:00:00 2001 From: Alex Southwell <4596216+saphid@users.noreply.github.com> Date: Tue, 3 Nov 2026 17:55:59 +1100 Subject: [PATCH 2/4] test(server): signing fixtures use ssh-keygen whatever signer git is set to Co-Authored-By: Claude Opus 5.5 --- apps/server/src/git/GitManager.test.ts | 2 ++ apps/server/src/vcs/GitVcsDriverCore.test.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/apps/server/src/git/GitManager.test.ts b/apps/server/src/git/GitManager.test.ts index e77cb5260a0ae..a7f64f925bef6 100644 --- a/apps/server/src/git/GitManager.test.ts +++ b/apps/server/src/git/GitManager.test.ts @@ -2580,6 +2580,8 @@ it.layer(layerGitManagerTest)("GitManager", (it) => { signingKey, ]); yield* runGit(repoDir, ["config", "gpg.format", "ssh"]); + // A global signer such as 1Password's cannot use the fixture's generated key. + yield* runGit(repoDir, ["config", "gpg.ssh.program", "ssh-keygen"]); yield* runGit(repoDir, ["config", "user.signingkey", `${signingKey}.pub`]); yield* runGit(repoDir, ["config", "log.showSignature", "true"]); yield* runGit(repoDir, ["commit", "--amend", "-S", "--no-edit"]); diff --git a/apps/server/src/vcs/GitVcsDriverCore.test.ts b/apps/server/src/vcs/GitVcsDriverCore.test.ts index 913dc925b413a..aca92c5afa078 100644 --- a/apps/server/src/vcs/GitVcsDriverCore.test.ts +++ b/apps/server/src/vcs/GitVcsDriverCore.test.ts @@ -2874,6 +2874,8 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => { ]); assert.equal(Number(yield* spawner.exitCode(keygen)), 0); yield* git(cwd, ["config", "gpg.format", "ssh"]); + // A global signer such as 1Password's cannot use the fixture's generated key. + yield* git(cwd, ["config", "gpg.ssh.program", "ssh-keygen"]); yield* git(cwd, ["config", "user.signingkey", `${signingKey}.pub`]); yield* git(cwd, ["config", "log.showSignature", "true"]); yield* git(cwd, ["commit", "-S", "-m", "range files"]); From 6e6b528aea442d0c1a916f3bab9dd8a25695f6bd Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Tue, 3 Nov 2026 18:17:18 +0000 Subject: [PATCH 3/4] test(server): isolate signed range fixture decorations --- apps/server/src/vcs/GitVcsDriverCore.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/server/src/vcs/GitVcsDriverCore.test.ts b/apps/server/src/vcs/GitVcsDriverCore.test.ts index 377e239b3cc52..f0105249866bf 100644 --- a/apps/server/src/vcs/GitVcsDriverCore.test.ts +++ b/apps/server/src/vcs/GitVcsDriverCore.test.ts @@ -2879,6 +2879,7 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => { yield* git(cwd, ["config", "gpg.ssh.program", "ssh-keygen"]); yield* git(cwd, ["config", "user.signingkey", `${signingKey}.pub`]); yield* git(cwd, ["config", "log.showSignature", "true"]); + yield* git(cwd, ["config", "log.decorate", "false"]); yield* git(cwd, ["commit", "-S", "-m", "range files"]); const driver = yield* GitVcsDriver.GitVcsDriver; const fileSystem = yield* FileSystem.FileSystem; From 7cbebeb18d6e684d2532e71eb0af8081175c18e6 Mon Sep 17 00:00:00 2001 From: Alex Southwell <4596216+saphid@users.noreply.github.com> Date: Wed, 4 Nov 2026 05:20:30 +1100 Subject: [PATCH 4/4] fix(server): range context ignores log.decorate Co-Authored-By: Claude Opus 5.5 --- apps/server/src/vcs/GitVcsDriverCore.test.ts | 2 +- apps/server/src/vcs/GitVcsDriverCore.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/server/src/vcs/GitVcsDriverCore.test.ts b/apps/server/src/vcs/GitVcsDriverCore.test.ts index f0105249866bf..7c9e764f441b3 100644 --- a/apps/server/src/vcs/GitVcsDriverCore.test.ts +++ b/apps/server/src/vcs/GitVcsDriverCore.test.ts @@ -2856,6 +2856,7 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => { yield* git(cwd, ["config", "diff.probe.textconv", "touch textconv-ran; echo converted"]); yield* git(cwd, ["config", "color.ui", "always"]); yield* git(cwd, ["config", "diff.relative", "true"]); + yield* git(cwd, ["config", "log.decorate", "short"]); yield* git(cwd, ["checkout", "-b", "feature/range"]); yield* writeTextFile(cwd, ".gitattributes", "*.doc diff=probe\n"); yield* writeTextFile(cwd, "notes.doc", "source line\n"); @@ -2879,7 +2880,6 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => { yield* git(cwd, ["config", "gpg.ssh.program", "ssh-keygen"]); yield* git(cwd, ["config", "user.signingkey", `${signingKey}.pub`]); yield* git(cwd, ["config", "log.showSignature", "true"]); - yield* git(cwd, ["config", "log.decorate", "false"]); yield* git(cwd, ["commit", "-S", "-m", "range files"]); const driver = yield* GitVcsDriver.GitVcsDriver; const fileSystem = yield* FileSystem.FileSystem; diff --git a/apps/server/src/vcs/GitVcsDriverCore.ts b/apps/server/src/vcs/GitVcsDriverCore.ts index 232cf53e31f68..f8b59f389567b 100644 --- a/apps/server/src/vcs/GitVcsDriverCore.ts +++ b/apps/server/src/vcs/GitVcsDriverCore.ts @@ -2946,6 +2946,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function* "log", "--oneline", "--no-color", + "--no-decorate", "--no-show-signature", "--end-of-options", commitRange,