The best way to control Claude Code, Codex and more from any computer or phone
fix(server): generated commit messages use source patches (#23164)
Co-authored-by: GPT-6.1 Sol <noreply@openai.com> Co-authored-by: maria-rcks <maria@kuuro.net>
Victor Vogel committed
Oct 31, 2026 at 21:25 UTC
0671305178330c8b38dff47b34f4acdc688a5c42
1 file changed
+23
apps/server/src/vcs/GitVcsDriverCore.test.ts
+23
@@ -4810,6 +4810,29 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
4810
});
4811
4812
describe("commit context", () => {
4813
+ it.effect("prepares source patches without running textconv", () =>
4814
+ Effect.gen(function* () {
4815
+ const cwd = yield* makeTmpDir();
4816
+ yield* initRepoWithCommit(cwd);
4817
+ yield* git(cwd, ["config", "diff.probe.textconv", "touch textconv-ran; echo converted"]);
4818
+ yield* writeTextFile(cwd, ".gitattributes", "*.doc diff=probe\n");
4819
+ yield* writeTextFile(cwd, "notes.doc", "original source\n");
4820
+ yield* git(cwd, ["add", "."]);
4821
+ yield* git(cwd, ["commit", "-m", "source document"]);
4822
+ yield* writeTextFile(cwd, "notes.doc", "updated source\n");
4823
+ const driver = yield* GitVcsDriver.GitVcsDriver;
4824
+ const fileSystem = yield* FileSystem.FileSystem;
4825
+
4826
+ const context = yield* driver.prepareCommitContext(cwd, ["notes.doc"]);
4827
+
4828
+ assert.include(context?.stagedPatch ?? "", "-original source");
4829
+ assert.include(context?.stagedPatch ?? "", "+updated source");
4830
+ assert.notInclude(context?.stagedPatch ?? "", "converted");
4831
+ assert.include(context?.stagedSummary ?? "", "notes.doc");
4832
+ assert.isFalse(yield* fileSystem.exists(`${cwd}/textconv-ran`));
4833
+ }),
4834
+ );
4835
+
4836
it.effect("can omit the patch while preserving change detection and the real index", () =>
4837
Effect.gen(function* () {
4838
const cwd = yield* makeTmpDir();