Skip to content

[Bug]: GitVcsDriver.checkpoints.listAuthoredPaths fails with exit 128 (unknown value for --diff-merges: remerge) on Git < 2.36 (Ubuntu 22.04 LTS) #39690

Closed

Description

@haozhanxi-source

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Run T3 Code server on Ubuntu 22.04 LTS (which ships git version 2.34.1) or any host with Git < 2.36.
  2. Start a thread in a Git repository and complete a turn that creates a commit (advancing HEAD between checkpoints).
  3. Observe boot-service.log when GitVcsDriver.checkpoints.listAuthoredPaths runs.

Direct minimal repro on Git 2.34.1:

git log --format= --diff-merges=remerge HEAD~1..HEAD --name-only -z --no-renames --no-ext-diff
# fatal: unknown value for --diff-merges: remerge (exit code 128)

Expected behavior

GitVcsDriver.checkpoints.listAuthoredPaths succeeds on Ubuntu 22.04 LTS (Git 2.34.1) and other supported LTS distributions, consistent with the existing Git version compatibility guard in apps/server/src/vcs/GitVcsDriver.ts (e.g., line 2083: // Not --no-relative, which Git before 2.28 rejects.).

Actual behavior

Every turn that moves HEAD fails listAuthoredPaths with Git exit code 128 because --diff-merges=remerge was introduced in Git 2.36.0 (April 2022):

  • apps/server/src/vcs/GitVcsDriver.ts:2209:
    listPaths(["log", "--format=", "--diff-merges=remerge", ${endHead}..${startHead}])
  • apps/server/src/vcs/GitVcsDriver.ts:2252:
    listPaths(["log", "--no-walk=unsorted", "--stdin", "--format=", "--diff-merges=remerge"], ...)

Verified still present on main (post-v0.1.11).

Impact

Major degradation or frequent failure

Version or commit

v0.1.10 (observed in production); verified still present on main (post-v0.1.11)

Environment

Ubuntu 22.04.5 LTS (Linux 6.8.0 aarch64), Git 2.34.1, Node v22.23.4, T3 Code standalone server (t3code.service)

Logs or stack traces

WARN: orchestration V2 checkpoint authored paths failed
  {
    scopeId: 'checkpoint-scope:thread:<redacted>:name:root',
    checkpointRef: 'refs/t3/orchestration-v2/checkpoints/<redacted>/ordinal/63',
    cause: 'VcsProcessExitError: VCS process failed in GitVcsDriver.checkpoints.listAuthoredPaths: git (<repo>) exited with 128 - Process exited with a non-zero status.'
  }

# Direct git reproduction on the same repo/commits with Git 2.34.1:
$ git --version
git version 2.34.1
$ git log --format= --diff-merges=remerge <endHead>..<startHead> --name-only -z --no-renames --no-ext-diff
fatal: unknown value for --diff-merges: remerge
# exit code 128

Workaround

Upgrade Git to >= 2.36 (e.g., via ppa:git-core/ppa on Ubuntu 22.04), or fall back in GitVcsDriver.ts from --diff-merges=remerge to --diff-merges=first-parent / -m when Git < 2.36 is detected (or when git returns unknown value for --diff-merges: remerge).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions