fix: cap git status forks process-wide #526
No reviewers
Labels
No labels
backend
bug
chore
duplication
effort:complex
effort:medium
effort:trivial
enhancement
follow-up
frontend
fullstack
priority:high
ready-for-agent
refactor
security
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dries/ocman!526
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/git-status-chat-blocking"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
git statuslookups was perLookupManycall, so concurrent/api/git/inforequests (severaluseGitInfohooks mount at once) forked 3×8 git children and the burst stalled unrelated handlers.internal/git. Cache hits never wait; a caller whose context dies while queued gets a zero Info back without caching it (a cached zero would mark the dir "not a repo" for a full TTL).Testing
TestLookupMany_WorkerCapIsProcessWidefails on main (observed 24 concurrent fetches, want ≤ 8) and passes with the fix.TestCache_CancelledContextWhileWaitingForSlotcovers the queued-then-cancelled path.make test,make lint,go test -race ./internal/git/all pass;internal/gitcoverage 83.5%.Coverage ratchet: ✅ pass
Tolerance: -0.1%. Baseline stored on
gh-pages.