gitutil: bound git archive by time and size !194

merged merged by cmc on 2026-09-03 17:27 UTC · krz/gitbay:archive-bounds into main

Discussion

cmc

Archive ran git with no context and streamed to the client for as long as the client stayed connected; Grep had a timeout, Archive did not. It now runs under a two-minute deadline and a 512 MiB cap (MaxArchiveBytes), kills git past either, and returns ErrArchiveTooLarge or a timeout error instead of ending the stream short. Callers are unchanged.

TestArchiveCap covers a normal archive and the cap.

Stacked on !193; no code dependency.

Closes #124

retargeted from serve-shutdown to main: !193 merged

2026-09-03 17:10 UTC