Skip to content

Specification v0.6.0: terminal flag; FMSG-005 Reactions standard - #32

Merged
markmnl merged 4 commits into
mainfrom
terminal-flag-and-reactions
Sep 2, 2026
Merged

Specification v0.6.0: terminal flag; FMSG-005 Reactions standard#32
markmnl merged 4 commits into
mainfrom
terminal-flag-and-reactions

Conversation

@markmnl

@markmnl markmnl commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

Specification v0.6.0

  • New flag bit 6 terminal: a terminal message is a leaf of its thread. No later message may reference it via pid. A reply to, or add-to batch of, a terminal message is rejected with code 1, and a Sending Host must not transmit one. An add-to carrying the bit is rejected on header validation alone, since add-to copies the original's flags.
  • Reserved flag bits are now enforced: message bit 7 and attachment bits 2–7 set on the wire are rejected with code 1. This is what makes a host that predates a new bit fail consistently instead of silently accepting a message it does not understand.
  • New section Notes on Terminal Messages explains the difference from the advisory no reply flag and why the flag exists.
  • Both SPECIFICATION.md and the concise SPEC.md updated.

FMSG-005 Reactions (new standard, the driver for the flag)

  • A reaction is recognised by its shape, not a dedicated type: has pid, no reply, terminal and common type set, type ID 56 (text/plain;charset=UTF-8), no attachments, data a single RGI_Emoji (UTS #51) or empty to clear, sent to every participant of the subject.
  • Reuses delivery, retries, duplicate detection, the participant rule, the challenge and immutable storage. Hosts need not understand reactions to carry them, and unaware clients render one as the short text reply it is.
  • Effective reaction per reactor per subject is the latest by time; empty data clears.
  • No malformed-reaction category: a message either has the shape of a reaction or is simply a reply.
  • Interoperability table covers v0.6.0 hosts with and without the standard, and pre-v0.6.0 hosts (which reject with code 1).

Design notes

  • Code 1 is reused rather than adding a "parent terminal" code: a conforming sender's own host refuses to send such a message, so the rejection only ever signals a buggy or hostile peer.
  • Reserved-bit enforcement was extended to attachment flags for the same reason it applies to message flags.
  • A vendor Media Type was considered and dropped: a Media Type describes representation, the data is plain UTF-8 text, and a single-emoji terminal reply was meant as a reaction anyway.

Follow-ups

🤖 Generated with Claude Code

https://claude.ai/code/session_01MW4FXDGacoWXeKPU5cQTHS

Specification v0.6.0:
- Flag bit 6 "terminal": a terminal message is a leaf of its thread. A
  reply to, or add-to batch of, a terminal message is rejected with
  code 1 by the Receiving Host, and a Sending Host must not transmit
  one. Add-to messages carrying the bit are rejected on header
  validation alone since they duplicate the original's flags.
- Reserved flag bits (message bit 7, attachment bits 2-7) set on the
  wire are now rejected with code 1, so a host that predates a new bit
  fails consistently rather than accepting a message it does not
  understand.

FMSG-005 Reactions: a single-emoji reaction is an ordinary message with
has pid, no reply and terminal set, type application/vnd.fmsg.reaction,
data one RGI_Emoji or empty to clear, sent to every participant of the
subject. Latest by time wins per reactor per subject. Hosts need not
understand reactions to carry them; the terminal flag is what stops
anything being built on top of one.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MW4FXDGacoWXeKPU5cQTHS
Drop the dedicated application/vnd.fmsg.reaction Media Type. A Media
Type describes representation, and a reaction's data is UTF-8 text;
the intent is already carried by the flags. A reaction is now any
message with has pid, no reply, terminal and common type set, type ID
56 (text/plain;charset=UTF-8), no attachments, and data that is a
single RGI_Emoji or empty. A single-emoji terminal reply was meant as
a reaction anyway, unaware clients render it as the short text it is,
and the "malformed reaction" category disappears: a message either
has the shape of a reaction or is simply a reply.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MW4FXDGacoWXeKPU5cQTHS
- Message objects gain `terminal`, `reaction` and `reactions`.
- POST /fmsg and PUT accept `terminal`; a pid referencing a terminal
  message is 409, as is add-to on one.
- New POST /fmsg/:id/react sets or clears the caller's reaction by
  sending an FMSG-005 reaction message; idempotent when unchanged.
- New `reaction` WebSocket event carrying the refreshed subject; a
  reaction is never delivered as new_msg and produces no Web Push.
- Conformance tests extended.

FMSG-005: recognition MAY ignore the recipients requirement; point at
FMSG-003 v0.2.0 for the client API.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MW4FXDGacoWXeKPU5cQTHS
Comment thread SPECIFICATION.md Outdated
| v0.4.0 | 2026-08-02 | Mark Mennell | Add-to messages delivered to all participant domains; notification-only delivery completes at code 11 |
| v0.4.1 | 2026-08-03 | Mark Mennell | Hosts must retain stored messages in full, including complete recipient lists |
| v0.5.0 | 2026-08-10 | Mark Mennell | Clarified: stored messages include those the host sent; exactly one header-response code is sent; _add to_ may overlap _to_, with one response code per recipient entry; add-to copies omit _topic_; add-to batches are sibling branches whose added recipients reply to the batch message; batch identity is the batch message hash. Changed: an unsupported version TERMINATES rather than responding, retiring code 2 (numbering unchanged) |
| v0.6.0 | 2026-09-02 | Mark Mennell | Added: _terminal_ flag (bit 6) — no message may reference a terminal message via _pid_; hosts reject a reply to, or add-to batch of, a terminal message with code 1. Changed: reserved flag bits set on the wire (message bit 7, attachment bits 2–7) are rejected with code 1 so future bits degrade consistently |

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too verbose for revision notes description, keep it concise - logic lives in the spec

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shortened to: "Added terminal flag (bit 6); reserved flag bits set on the wire are rejected".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MW4FXDGacoWXeKPU5cQTHS
@markmnl
markmnl merged commit 2582839 into main Sep 2, 2026
@markmnl
markmnl deleted the terminal-flag-and-reactions branch September 2, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant