protocol: re-fetch on ENOENT when the inflight-dedup leader's temp is gone
fetchContent() dedups a concurrent fetch of the same content hash by copying
the leader's destPath to the joiner's. But the leader's caller (e.g. pgh
NetworkFetcher) unlinks its destPath as soon as it has read+verified the bytes,
which races ahead of the joiner's copy → deterministic ENOENT on any closure
with a duplicate content hash (hit installing pear-git-v3 on celltron). Mirror
the existing ECANCELLED path: on ENOENT, re-issue our own fetch. Safe from
looping — the scheduler entry is deleted in shared.finally() before the joiner's
.then runs, so the re-fetch starts fresh rather than re-joining.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fba26b2079802aebf6bfc7ae3f88e9170bafd983
by plankatron <fleeky@gmail.com> · 2026-07-15T00:51:39.000Z