Development record
A deadline-bound stored git read (gitutil.RunCappedBytesAsStoredContext, which the status reader's walk and batch reads use) first runs the object-read guard's git version probe and, on a git older than 2.44, a git config read, both outside the caller's context: with a git that does not answer, a read given 300 ms returned after 20 s. The prompt hook still answers inside its budget, since PromptNotes selects on the deadline, but the reading goroutine outlives it and the function's contract that git is killed when the context ends does not hold for those two commands.
A deadline-bound stored git read (gitutil.RunCappedBytesAsStoredContext, which the status reader's walk and batch reads use) first runs the object-read guard's git version probe and, on a git older than 2.44, a git config read, both outside the caller's context: with a git that does not answer, a read given 300 ms returned after 20 s. The prompt hook still answers inside its budget, since PromptNotes selects on the deadline, but the reading goroutine outlives it and the function's contract that git is killed when the context ends does not hold for those two commands.
Frontmatter
| id | iss-2610161207130167 |
|---|---|
| type | issue |
| lifecycle | open |
| severity | minor |
.abcd/work/issues/open/iss-2610161207130167-a-deadline-bound-stored-git-read-gitutil.md
open on GitHub ↗ · commit history ↗