fix(server): avoid slow checkpoint index rebuilds - #8538
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e3674afe966682d062f243a827a4fd11b7c68dfb. Configure here.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — The production checkpoint-capture path now includes substantial Git-index copying, flag normalization, fallback handling, and lock cleanup for every headed repository. Although the intent is clear and targeted tests were added, the runtime behavior and Git-specific complexity warrant human review. You can add or adjust custom eligibility rules. Learn more. |
e3674af to
4b61437
Compare

Problem
Checkpoint capture rebuilds a temporary index from
HEAD, sogit add -Amust rescan the whole working tree. On large repositories this can hit the 30-second VCS timeout and leave temporary index lock files behind.Fix
Seed the temporary checkpoint index from the worktree's current Git index to retain its stat cache, then normalize the copy before staging:
HEADassume-unchangedandskip-worktreeflagsHEADindex if the live index cannot be copied or inspected safelyCleanup removes both the temporary index and its
.lockfile. The user's real index is never modified.Tests
pnpm --filter t3 exec vp test run src/vcs/GitVcsDriver.test.ts src/checkpointing/CheckpointStore.test.ts(13 passed)pnpm --filter t3 typecheckassume-unchangedandskip-worktreegit add -Acompleted in 559 ms instead of timing out at 30 seconds