fix(media): an uploader checks the relay's upload status before trusting it

A chunk of 0 looped forever, a huge chunk held the film in memory and a huge
window opened a request (a thread on Kotlin) per piece. statusProblem checks
chunk, window, received and landed; the client window is capped at 16. Same
in MediaUploader, with tests on both sides.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-10-19 00:31:06 +02:00
parent 0a706cdb47
commit 7d45be8712
7 changed files with 133 additions and 9 deletions

View File

@@ -132,6 +132,10 @@ New package **`@shade/media`** — see `docs/media.md`.
### Fixed
- An uploader (TS and Kotlin) trusted the relay's upload status: a `chunk` of
0 looped forever, a huge one held the film in memory, a huge `window` opened
a request (a thread, on Kotlin) per piece. The status is now checked
(`statusProblem`) and the window capped at 16.
- `shade media get` used the sealed file's `meta.name` as the output path,
so whoever sealed a file chose where it was written (`../../.bashrc`).
Names are now reduced to one safe path component.