Repository navigation
Conversation
To reply to a message, you and everyone on your reply must have that message, whichever host they are on. An add-to batch is a message of its own: the original's contents with the wider audience. Its participants are the original's sender and recipients, the adder and the recipients it added. Someone only added in a batch holds the batch, not the original, so a reply that includes them must name the batch by its sha256. Send now answers 409, naming who doesn't hold the parent, instead of sending a reply their host would reject (or, on this host, that they'd receive without its parent). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… out A reply whose to recipients don't all hold its parent is now refused on create and update as well as on send, so a draft that could never be sent isn't written. Send remains the gate. Recipients added to the reply itself (add-to on the draft) are outside the rule, and no longer count in the remote-domain check either: they are sent the reply as an add-to message, whose pid names the reply rather than its parent, and a host that doesn't hold a message someone is added to takes it as a full delivery (SPEC §10.3 step 7). The domain check was refusing a send the spec allows. A failed participant lookup is now logged, and the README covers the new 409 on create, update and send. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rule: to reply to a message, you and everyone on your reply must have that message, whichever host they are on.
An add-to batch is a message of its own: the original's contents with a wider audience. Its participants are:
Someone only added in a batch holds the batch, not the original. So a reply that includes them must name the batch (
pid= the batch sha256). Otherwise their host rejects the reply (code 6), or, on the same host, they'd get it without its parent.Change:
POST /fmsg/:id/sendanswers 409 when a reply has a recipient who isn't a participant of the parent it names. The error names them and gives the remedy (reply to their batch, or add-to). The sender was already checked (resolveParent).Tests:
TestReplyRecipientsMustHoldParent.TestPurgenow sets up its "recipient holds a reply but not its parent" state directly in the database, since that state can still arise from stored deliveries but can no longer be sent.Clients: markmnl/fmsg-mcp#38 makes
replyandcreate_draftname the batch.🤖 Generated with Claude Code