GET-044 JS: wire.fetch buffers the WHOLE pack in RAM stream to a tmp file in the shard

Now
OPEN
Sev
HIGH

jab get of a big remote holds the entire packfile in process memory: wire.js fetch reads the raw pack to EOF into a chunks[] array and then CONCATENATES it into one Uint8Array peak RSS 2× pack size and ingest writes that single buffer out afterwards. Observed live this session: jab get ssh://git@github.com/torvalds/linux.git (pid 14199) at RSS 2.78 GB after 2.7 GB received, fd table shows NO store file open (only the ssh pipe) a Linux-scale pack (3.5 GB) peaks at ~7 GB and OOMs modest boxes. Fix = git's own model: stream the pack into a tmp_pack_* file INSIDE the destination shard, hash as it streams, index/ingest off mmap, atomically rename into place on a verified trailer. Method: work.

Input

Context

Goals

Constraints

WIP

Design decisions

TODOs

Blockers and bummers

Outcome