Repository navigation
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…-blobs-ignore-pathspec Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e55a44b to
a392b42
Compare
Problem
Checkpoint capture reuses blobs of unchanged untracked files (
apps/server/src/vcs/checkpointUntrackedBlobs.ts) and re-checks remembered paths withgit check-ignore -z --stdin, which reads a leading:as pathspec magic. A remembered:ignoredfile added to.gitignorelater is missed (exit 1) and re-inserted into the next checkpoint, so that checkpoint holds an ignored file a fresh capture would not. A remembered:(magic)file makesgit check-ignorefail (fatal: Invalid pathspec magic; on the real path its stderr exceeds the output cap, so reuse fails), dropping reuse for every file in that workspace on every capture.Change
In
apps/server/src/vcs/checkpointUntrackedBlobs.ts, I prefixed eachgit check-ignorestdin path with./and stripped one leading./from each echoed path—the same fix #42333 merged inWorkspaceEntries.ts.--literal-pathspecs,GIT_LITERAL_PATHSPECS, and:(literal)are rejected bygit check-ignore(exit 128).git check-attr(the attribute read beside it) reads stdin paths literally, so I left it unchanged. Inapps/server/src/vcs/GitVcsDriver.test.ts, I added two cases to the untracked-blob reuse table (:large.txtbecoming ignored and:(magic)staying reused), skipped on Windows where:is not a legal filename.Scope
Bug fix for wrong checkpoint contents and dropped untracked-blob reuse on colon-prefixed names. No issue: small fix for an obvious bug, matching #42333.
Verification
Steps (Linux): In three temp repos with 64 MiB untracked files (so staging crosses the reuse threshold after settling), run
GitVcsDriver.checkpoints.captureCheckpointthree times—writing.gitignore(:ignored) before capture 3 in A and C—and compare the reusing driver's tree against a fresh driver's tree on both commits.Setup: Linux, Git 2.53.0, Node 26.13.1; server-only (+5/-2 prod, +18/-2 test), no UI change, text evidence only.
:ignored,plain.bin+.gitignore[]), reuses both,:ignoredin tree (trees equal: false)["./:ignored"]), reuses["plain.bin"](trees equal: true):(magic),plain.bin(unchanged)52 > 19B), reuses nothing (trees equal: true)[]), reuses[":(magic)","plain.bin"](trees equal: true):ignored,:(magic),plain.bin+.gitignore52 > 28B), reuses nothing (trees equal: true)["./:ignored"]), reuses[":(magic)","plain.bin"](trees equal: true)Tests (Node 26.13.1): On
68d6ef6, both new cases fail. On62cff82, all 13 reuse cases pass three times. Removing the./strip on62cff82fails the new ignored case and the existing"it became ignored"case.vp run check:changedpasses (format, lint, knip, graphql, typecheck, tests).Test and script output
Not checked: Windows (new cases skipped there), macOS, a full app turn (the script calls the same driver method a turn's capture calls).
Who tested: An AI agent ran every check.
Generated with Gemini 4 Neon in T3 Code Nightly