Development record
A context-bound git command can outlive its caller's deadline: isolatedGitContext runs the partial-clone guard (lazyFetchGuard) first, and the guard's own git version probe and its floor-config read run with no context, so a git that hangs holds a caller on a deadline (the status verb, the prompt hook's reads) for as long as git hangs, though the command itself is killed at the deadline. Found when TestRootCommitContextKillsGitAtTheDeadline, run alone, took 20 s against a 500 ms deadline because its hanging fake git answered the guard's probes.
issueresolvedminoriss-2610181802344551
A context-bound git command can outlive its caller's deadline: isolatedGitContext runs the partial-clone guard (lazyFetchGuard) first, and the guard's own git version probe and its floor-config read run with no context, so a git that hangs holds a caller on a deadline (the status verb, the prompt hook's reads) for as long as git hangs, though the command itself is killed at the deadline. Found when TestRootCommitContextKillsGitAtTheDeadline, run alone, took 20 s against a 500 ms deadline because its hanging fake git answered the guard's probes.
Grounds
- pursued: a status refresh or prompt hook on a deadline returns at it and leaves no git running whatever git does; a git process still alive after RootCommitContext returned at its deadline would show this wrong
Frontmatter
| id | iss-2610181802344551 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2610181802344551-a-context-bound-git-command-can-outlive.md
open on GitHub ↗ · commit history ↗
mentions1
- dcn-26102800360194592026-10-28 — Resolve iss-2610110253059544 as fixed on main rather than landing the 12 October gitutil-probe branch. Main's iss-2610181802344551 work already does what the issue's remedy asks: the version probe runs under the caller's deadline where it has one (atLeastContext) and within 30 seconds where it has none (probeGitVersion), the lock is not held while git runs, git is killed at cancel (CommandContext with WaitDelay), a failed probe is not cached, and TestAContextBoundReadEndsAtItsDeadlineWhileTheVersionProbeHangs proves the call returns by its deadline and no git is left behind. The branch's 250ms fixed deadline conflicts with that design, and rebasing it would mean rewriting it against code that already answers the issue. The branch stays as it is, unmerged.