Merged with --no-ff as 7f46bc5156690305389e671bf42f11076821143c on main (remote hash verified). The review is above (14/14 planted bugs caught; 7 findings: one fixed here, four accepted and…
Finding 7 (note): the relay allows 410 chunks = 104 953 440 plaintext bytes; the client refuses over 100 MiB = 104 857 600. The relay is the looser side by under 100 KB; nothing depends on the two matching. A wire test pins that 410 chunks hold 100 MiB and 409 do not.
Finding 1 (fixed): before this, a body over a route's DefaultBodyLimit got axum's own 413 with a text body — on the blob route and the JSON routes too, so PROTOCOL.md §8's A refusal has no body was not true. Every handler now takes Result<Bytes, BytesRejection> and answers a bare 413; a_blob_over_256_kib_is_refused checks the body is empty for a blob and for a 64 KiB JSON body.
Finding 2 (accepted, documented as G57): POST /v0/files needs no token, and a file reserves chunks × 256 000 from creation (so an upload in progress is never cut off). About 40 empty 410-chunk files hold a default relay's 4 GiB until the 24-hour purge of incomplete files. As cheap as filling the blob quota today (F23's stated limit); the operator's flags bound it. Later: a shorter deadline for incomplete files, or reserving per chunk that arrives.
Finding 3 (accepted, documented): seal is deterministic in (key, index), which is what makes a resumed upload idempotent — but two different plaintexts for one index under the same key reuse a ChaCha20-Poly1305 nonce (keystream and Poly1305 key). The relay refuses the second with 409, yet it has received both bodies. Can happen if an app re-reads a source file that changed between tries. The doc says so; Amicitia stores the parts with the upload and never re-reads. A misuse-resistant AEAD (SIV) would remove the trap; not in the tree today.
Finding 6 (note): download reserves file.size bytes (at most 100 MiB, checked when the payload arrived) before the first chunk; a peer can make the receiver allocate that much for nothing. Bounded, and the app decides when to call it (Amicitia: automatically only ≤ 10 MiB). get_chunk is there for chunk-by-chunk use.
Finding 4 (accepted): a zero 7-byte STREAM prefix and empty associated data. Safe because a key is made for one file and never reused (start_upload); a later forward feature that reuses a key must keep the same chunks, never re-seal. Written in PROTOCOL.md §4 A file's chunks.
Finding 5 (accepted, stated): no fetch count is stored, but the relay sees each GET as it serves it, and the upload is followed by a blob post to the recipient's mailbox from the same address within seconds — so an operator who logs at the network layer links sender, file and recipient by timing. Same class as §1's existing honest limit; files.md §3 says it.