An idea for later, not planned work yet: let someone send a reply before the post it answers exists, and add that post afterwards.
It came up while reviewing the duplicate-post fix (PR #145). That fix lets the browser choose a post's ID before sending it (thread-<32 hex>, reply-<32 hex>). So a client could already write a reply that names a parent ID nobody has posted yet.
The server is the missing half. Today assertReplyTarget in LocalWriteService loads the thread root and the parent from the repository and refuses the reply if either is missing. The one exception is a parent that was removed, since its removal record still says which thread it was in.
To make this work, the server would keep such a reply as staged instead of refusing it, and attach it once the parent arrives. That fits the accept-and-stage principle, so it probably belongs in the accept_and_stage cycle. Open questions:
What does a staged reply look like to its author, and to operators, while the parent is missing?
What happens if the parent never arrives? Keep it staged forever, expire it, or let the author post it as its own thread?
Should the reply name both thread_id and parent_id up front, or only the parent, with the thread worked out when the parent lands?
How does a static export or replay treat a reply whose parent isn't there yet?
Nothing in PR #145 depends on this.
Sources:
Review thread: https://zenmemes.com/threads/thread-20261110175436-b3745c6d