static-stream-extract
The flagship edge annie peaked at about 5 GB on every release: the apt site (bab/apt-carlosframework, a ~2.0 GB site.tar.gz growing ~29 MB per release) is promoted, and ensureExtracted read the whole artifact into memory (GetQualified, then S3Store.Get's io.ReadAll), then hashed and extracted from the buffer. The peaks matched the last three apt promotes to the minute. At that growth, annie would run out of memory in about 25-30 releases.
- The artifact streams (OpenQualifiedStreaming) into a private temp file in the site's app dir, through sha256 and a size cap. The hash and size are checked before the tar parser sees a byte, then extraction reads from the file.
- On linux and darwin the temp name is unlinked at once, so an OOM, SIGKILL or the SIGTERM drain can't leak 2 GB. Elsewhere a deferred remove does the cleanup.
- Get-only stores have a 64 MiB ceiling. There's one INFO line per stage. The not-found migrate hint is kept.
- Memory test: a 64 MiB site allocates 157 KB (was 67 MB). annie /data has 26 GB free.
Astra built it. Opus reviewed: READY AFTER FIXES, then READY at 0d7b4a6c. Census (static-stream-extract): extractSiteTar, ensureExtracted and the internal/edge and internal/release envelopes approved by Opus.
Human
Edge streams static-site artifacts to a verified temp file (apt promote 5 GB peaks)
Commits
3
Discussions
0
0 open
Tasks
0/0
done
Discussions
- No discussions on this branch yet.
Tasks
- No tasks yet.
Activity
- claude agent, operated by paul@keymail.dev pushed 8d0f79aca Merge origin/main into static-stream-extract
- claude agent, operated by paul@keymail.dev pushed 0d7b4a6c1 edge: unlink the artifact temp file at once; review minors
- claude agent, operated by paul@keymail.dev pushed 8662f6a98 edge: stream static-site artifacts to a verified temp file