Description
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 (checkpoint state also reaches web/desktop/mobile clients)
Steps to reproduce
- In an isolated T3 development checkout, start
vp run dev --no-seedand use its.t3state. - Create and register a disposable project while its Git config is valid:
checkpoint_fixture=$(mktemp -d)
git -C "$checkpoint_fixture" init
node apps/server/src/bin.ts project add --base-dir .t3 "$checkpoint_fixture"- Make only that disposable repository's Git config invalid, then verify the operational failure:
printf 'invalid config\n' > "$checkpoint_fixture/.git/config"
git -C "$checkpoint_fixture" rev-parse --is-inside-work-treeGit exits 128 with fatal: bad config line 1 in file .git/config.
- Run a free development replay turn in the project:
node apps/server/src/bin.ts thread start --base-dir .t3 \
--provider devReplay --model todo-list "$checkpoint_fixture" "Update the workspace" --wait- Inspect the completed turn's checkpoint/diff state. Also consider a probe failing at baseline capture and recovering before final capture, or a ref lookup failing after a snapshot was saved.
Expected behavior
Keep ordinary absence separate from an operational Git failure. The provider and run should finish, with the unavailable checkpoint/comparison recorded visibly. A successfully saved snapshot should remain restorable when only its comparison fails. A missing predecessor must not count as a successful empty comparison. Recovery must preserve the predecessor's run identity.
Actual behavior
Repository probes map every nonzero exit to false/null, and checkpoint code swallows repository detection errors. Ref resolution also maps every nonzero exit to absence. Failures can therefore become missing checkpoints or completed turns with empty file summaries. Existing comparison consumers cannot distinguish an uncomputed comparison from zero changed files.
The affected paths are GitVcsDriver.isInsideWorkTree, GitVcsDriver.detectRepository, checkpoint ref resolution, and CheckpointService capture/materialization. Regression tests fail on the original implementation and pass with typed failure classification and durable comparison availability.
Impact
Major degradation when Git fails: changed files can disappear from a turn's review, and the expected rewind snapshot may be unavailable.
Version or commit
Reproduced against source base 88f611368e0166a543b294d69747eefe46fed73e. The original installed Nightly build is unknown.
Environment
macOS 27.0.1, Node v22.22.0, Git 2.56.0 for the controlled reproduction. The original symptom involved intermittent Git access failures on macOS. Both Apple and Homebrew Git failed; Documents permission was already enabled. The exact OS cause remains unproven. The T3 failure-classification bug is independently reproducible with invalid config.
Verification and proposed scope
The prepared repair passes 227 selected tests and 9 selected React compiler checks plus check:changed. Coverage includes real Git errors, saved-snapshot restore and subsequent recovery, persisted summary availability, predecessor identity/rollback context, and mobile comparison states. A shared-browser replay completed the provider and showed the new checkpoint warning against isolated state. Native clients and a live provider rewind were not run.
Proposed scope: classify operational Git failures truthfully, preserve checkpoint identity during recovery, and carry comparison availability through existing checkpoint persistence and review clients. No database migration, historical snapshot reconstruction, installed-app deployment, permission changes, or simulator work.
I am requesting maintainer triage of this failure and scope before opening the substantial repair PR, as required by CONTRIBUTING.md.
Workaround
After Git access/configuration recovers, a later capture can work again. Snapshots that were never captured cannot be reconstructed from that recovery. Restarting the app or changing macOS permissions was not established as the cause or remedy.
Prepared repair
The reviewed branch is sreejithraman/t3code:fix/checkpoint-git-errors, at e88d5ee4b4. Four final source reviews found no material actionable code findings. The final patch passes vp run check:changed 88f611368e01 with 227 selected tests, 35 affected typechecks and nine selected React compiler checks.
Discarded or unknown predecessor snapshots now leave the comparison unavailable while preserving the newly captured snapshot for restore. A later valid capture restores comparison availability. Rollback cleanup and provider retry behavior remain unchanged. Legacy persisted synthetic baselines are not reconstructed or authenticated by this repair.
No upstream PR has been opened while maintainer triage is pending. UI evidence uses an isolated shared-browser replay; native rendering and native before/after evidence remain unverified.
Activity