Repository navigation
fix(server): overlapping status reads share one untracked listing - #34574
yaacovcorcos wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Overlapping status reads now share the same in-flight untracked-file listing, while later reads refresh normally. The change also preserves underlying error details without changing product defaults or persistent repository data. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
Two follow-ups from CodeRabbit's review of #34460, which merged without them:
git ls-files --others. Thebackoff from fix(server): branch totals stop relisting untracked files after a failed listing #34460 only applies once a listing has failed, so reads that pass the check while a
slow listing is still running (for example a status read restarted by a file change during a
30 s listing timeout) each walk the whole untracked tree again, holding foreground Git slots.
underlying failure are dropped, against the rule that a wrapping error keeps the error it wraps
as
cause.Change
Cachekeyed by worktree and pathspecs, with atimeToLiveof zero. A read that arrives while the same listing is running waits for it insteadof starting another; the result is never kept, so the next read lists again. The cache keeps a
shared listing running until its last waiter leaves, so one interrupted read does not cancel the
others. Each read still prepares its own temporary review index.
GitCommandErroris kept ascauseon the branch-totals error, for a fresh failureand for the remembered one. "Too many untracked files to count." has no cause.
Scope and approval
Follow-up to #34460 (issue #34457), answering its two open CodeRabbit comments. No setting,
contract or UI change. Submitted under the focused obvious-bug exception in CONTRIBUTING.md; no
maintainer approval is claimed.
Verification
share one listing between overlapping status reads(GitVcsDriverCore.test.ts): thespawner holds the first read's listing until the second read's last Git command before its
listing (
show-refof the branch) has returned, then releases it. Both reads report the sametotals.
statusDetailsLocal, which turns a totals failure into missingtotals; it shows in the
readBranchChangeTotalsspan. No separate test.vp test run src/vcs/GitVcsDriverCore.test.ts: all pass exceptkeeps generated worktree folders short without changing long branch names, which also fails onunchanged main on this Mac (
/private/varversus/var). Server typecheck;vp lintandvp fmtonapps/server/src. macOS only; not run on Linux or Windows.Written with Claude Opus 5.5 in Claude Code; reviewed with gpt-6.1-sol in Codex.