Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

Opensergical(GitHub profile, opens in a new tab) opened this issue 0 comments

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
VariantGit 2.56.1 (Homebrew)Git 2.54.0 (Apple)
private object folder, batch3/3 failed3/3 failed
normal object folder, batch0/3 failed0/3 failed
private object folder, no batch0/4 failed
repository with no commit yet0/3 failed0/3 failed

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

Version

main @ 21d7feaff7

Environment

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

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.

  1. tanstack-source added labelsbug

Sign in to join this conversation.