You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cc18919
Browse filesBrowse the repository at this point in the historyBrowse files
fix(cli/deploy): drop assetFiles refs as soon as R2 acks each PUT
streamDirectR2Deploy held every asset's bytes in `assetFiles` until
finalizeDeploy returned, even for entries preflight reported as already
in R2. A 142 MB mostly-cached deploy paid full resident memory for
nothing.
Two-stage release:
- Right after preflight, prune `assetFiles` to the `needed` subset so
skipped entries become GC-eligible immediately. Pre/post sizes log
to the JSONL trace as `asset_cache_pruned` for retrospect.
- During upload, `uploadAssetsToR2` now clears `item.body` and invokes
an `onAfterPut` callback after each successful PUT. The deploy
driver passes `assetFiles.delete(item.path)` so peak memory under
the bounded pool tracks `R2_PUT_CONCURRENCY × asset_size`, not the
full bundle. Callback is suppressed on PUT failure so callers can
still re-presign / retry without losing the buffer prematurely.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments