mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-08-24 12:06:36 +00:00
The four Zip* builders deferred zw.Close() with an unnamed return, dropping the error from the central-directory flush. After the resources download moved to direct socket streaming, a dropped connection during that final flush could return a truncated archive under HTTP 200. Capture Close() via a named return so streamZipArchive logs and aborts the partial response. Regression tests in both packages drive the Close() error path with a failing writer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>