Skip to content

fix(vcs): preserve index timestamp on review index to avoid racy stat cache misses - #706

Merged
rynfar merged 1 commit into
pylonfrom
fix/vcs-review-diff-racy-index
Sep 21, 2026
Merged

rynfar merged 1 commit into
pylonfrom
fix/vcs-review-diff-racy-index

Conversation

@rynfar

@rynfar rynfar commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #646

When copying .git/index to a temporary index file in prepareReviewIndex, the new temporary file gets a fresh mtime. If a tracked file was modified within the same timestamp tick as the committed index, git's stat cache comparison treats the file as unmodified because the index's mtime is newer than the file's mtime and file size is unchanged.

Preserving the original index's mtime via fileSystem.utimes (consistent with GitVcsDriver.ts) ensures Git's racy index protection remains active.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@vercel

vercel Bot commented Sep 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pylon-marketing Building Building Preview Sep 21, 2026 2:24pm UTC

@rynfar
rynfar merged commit 3e1492d into pylon Sep 21, 2026
12 of 15 checks passed
@rynfar
rynfar deleted the fix/vcs-review-diff-racy-index branch September 21, 2026 14:25
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: GitVcsDriverCore 'keeps complete stats for files beyond the combined patch limit' is flaky

1 participant