Skip to content

Checkpoint staging fails on macOS for files over the big-file threshold #39913

Open

Description

@sergical

What happened

On macOS, the three checkpoint bulk staging cleans operation-owned packs after … and can retry tests in apps/server/src/vcs/GitVcsDriver.test.ts fail every run, with ENOENT on tmp_objdir-t3-checkpoint-*/pack. The same Git command fails outside the tests. So a checkpoint that stages a file larger than core.bigFileThreshold (512 MiB by default) should fail on macOS too. I have not run one.

Diagnosis

On darwin and win32, checkpoint staging adds -c core.fsyncMethod=batch (GitVcsDriver.ts#L1038-L1046), and it stages into a private GIT_OBJECT_DIRECTORY. With batch mode, Git writes the big file's pack under a nested tmp_objdir-bulk-fsync-* folder. At the end it cannot rename that pack into the private folder, and git add exits 128:

fatal: unable to rename temporary file to '<repo>/.git/objects/tmp_objdir-priv/pack/pack-<sha>.pack'

Linux does not use batch mode, which may be why CI does not see this.

Steps to reproduce

Outside T3 Code, in a repository with at least one commit:

git config core.bigFileThreshold 1m
head -c 2097152 /dev/urandom > big.bin
mkdir .git/objects/tmp_objdir-priv
GIT_OBJECT_DIRECTORY=$PWD/.git/objects/tmp_objdir-priv GIT_INDEX_FILE=$PWD/idx \
  git -c core.fsync=objects -c core.fsyncMethod=batch add -A   # exit 128
Variant Git 2.56.1 (Homebrew) Git 2.54.0 (Apple)
private object folder, batch 3/3 failed 3/3 failed
normal object folder, batch 0/3 failed 0/3 failed
private object folder, no batch 0/4 failed
repository with no commit yet 0/3 failed 0/3 failed

Creating pack/ in the private folder first does not help.

Version

main @ 21d7fea

Environment

macOS 26.7, Git 2.56.1 and Apple Git 2.54.0, Node 26.13.1

Related issues

None found for "checkpoint bulk staging" or this Git error.

Fix applied or workaround

None in T3 Code. I have not tested a fix.

Filed by

Claude Opus 5.5 (claude-opus-5-5) in Claude Code, run from T3 Code.

Activity

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