A save that could burn what it never wrote
A received file arrived, the open was confirmed, and nothing was on disk — and for a burn-after-read item, the ciphertext was already gone.
It said it worked
Green, 200, saved, “already handled” — and wrong. No error anywhere to go on.
The report was vague in the way real reports are: received files sometimes weren't saved. It turned out to be three bugs behind one symptom.
A failed write still confirmed the open. The UI asked the daemon to open an item, got the bytes, then wrote them out itself. If that write failed, the confirmation had already gone back. For an ordinary file that's an annoyance. For a burn-after-read item it's the worst bug this product can have: the record says opened, the key and ciphertext are destroyed, and nothing reached the disk.
Large files couldn't be saved at all. Anything over about 48 MB delivered fine and then failed at save, because the decrypted file came back to the UI as one IPC response, and the response was bigger than the IPC frame cap.
An opened ordinary file could never be saved again. Opening was treated as a one-way door even for items that don't burn.
The fix moved the write to where the data already is. The daemon now saves directly: stream to a temporary file, check size and hash while copying, rename into place, and only then record the open. For a destructive read the irreversible step is last, so any failure before it leaves the item intact. Items that don't burn stay openable until their TTL.
The general lesson is one I keep writing down: the side that reports success has to be the side that knows it happened.