async fn repo_key(cwd: &Path, budget: Duration) -> PathBufExpand description
The repository a checkout belongs to, as the fetch gate’s key: git’s common dir, canonicalised.
Keyed on the common dir rather than the scan cwd because linked
worktrees share refs/remotes/*. Two seats in <repo> and
<repo>/.claude/worktrees/x - this project’s normal layout - contend for
one ref lock, so a gate keyed per cwd would let both fetch at once and
misattribute the loser’s refusal. A path git cannot answer for falls back
to the cwd: a separate gate cannot deadlock, it only fails to serialise.