Repository navigation
FMSG-008 edits: edit route, edited message fields, edit event - #67
Merged
Merged
Conversation
Implements FMSG-003 v0.5.0. The caller supplies the complete new body; the server derives a copy/insert edit document and sends one edit message for the original and one per add-to batch. Reads present the effective edit: short_text, the data route (original=true for the original) and both thread routes. Edit messages are flagged, routed as an edit event rather than new_msg, and trigger no Web Push. Also FMSG-005 v0.1.1: a reaction to a message sent only to oneself is addressed to the caller instead of being refused. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This was referenced Nov 11, 2026
markmnl
enabled auto-merge (squash)
November 11, 2026 06:55
markmnl
disabled auto-merge
November 11, 2026 09:56
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.
Implements FMSG-008 Edits as specified for clients by FMSG-003 v0.5.0.
What changes
POST /fmsg/:id/editwith{"data": "<complete new body>"};nullreverts. Author only, sent and non-terminal messages only. The server derives the edit document and sends one edit message for the original and one per add-to batch (to the recipients that batch added). Idempotent when the effective data would not change.edit(this message is an edit message, so clients hide it) andedited({id, time, size}of the edit in force, ornull).short_text,GET /fmsg/:id/data(?original=truefor the original),GET /fmsg/:id/threadand/thread/messages(body cached under the edit message's hash).editWebSocket event carrying the refreshed subject, never asnew_msg, and sends no Web Push.internal/edit: the edit-document codec (check, apply with a size limit checked before allocation, and a prefix/suffix diff that never exceeds a full replacement).409.No schema change.
Notes
409if a remote recipient host does not hold the subject.editwill show edit messages as small binary messages in lists once someone uses the route.Testing
go test -race ./...passes against PostgreSQL 17, including new integration tests for the edit lifecycle, refusals, forged and malformed edits, add-to recipients, and notes to self.🤖 Generated with Claude Code