radicle-lfs-transfer/src
Maciek "mab122" Bator 3215f231d8 Fetch multiple LFS objects through one long-lived worker, not per-object
download_inner used to spawn a fresh `rad lfs fetch` subprocess for
every object, each one independently loading the signer -- for a
private repo, checking out N files meant N separate passphrase
prompts (or N failures without RAD_PASSPHRASE). Same bug class the
pre-commit hook had before it was batched into `rad lfs precommit`,
just on the download side.

Fetch can't batch the same way: git-lfs's custom-transfer protocol
requests objects one at a time, so unlike the pre-commit hook (which
knows every staged file upfront), there's no point where the full
object set is known before starting. Instead, `fetch_worker::FetchWorker`
spawns `rad lfs fetch-batch` (new, radicle-heartwood-lfs) lazily on
first use and keeps it alive for the rest of the session, one request
per download, one JSON response line back -- so the signer is loaded
(and the passphrase prompted for) at most once per session.

If the worker process itself dies (broken pipe, unexpected exit) --
as opposed to a legitimate per-object failure like a missing note or
wrong passphrase, which isn't retried -- one respawn-and-retry is
attempted before giving up.
2026-07-17 23:42:17 +02:00
..
fetch_worker.rs Fetch multiple LFS objects through one long-lived worker, not per-object 2026-07-17 23:42:17 +02:00
kubo.rs Delegate IPFS/notes work to rad lfs store/fetch, add encryption support 2026-07-14 16:00:53 +02:00
main.rs Fetch multiple LFS objects through one long-lived worker, not per-object 2026-07-17 23:42:17 +02:00