check / check (push) Successful in 23s
Originals no longer buffer the whole decrypted file in RAM. `streamDecrypt` writes each secretstream chunk to the staged temp file as it is pulled and returns the byte count, so peak memory is one chunk, not the file size. The temp-then-rename fsync discipline of the exported `writeAtomic` is factored into a shared helper that both the whole-buffer path and the streaming path use. The rename still happens only after the stream authenticates on `TAG_FINAL`; a truncated or corrupt stream throws and removes the temp file, leaving the destination untouched as before. Because the plaintext is no longer buffered, the atomic write moved inside the retry: each attempt streams from byte zero into its own temp file and only a complete attempt renames. Closes #21. Model: opus-4-8