Mouth: chat_pending.v4 reply_to (flag, default off) #63

Merged
heimdall merged 2 commits from heimdall/chat-pending-v4 into main 2026-11-11 16:06:29 +00:00
Member

Adds chat_pending.v4 to the persona Matrix mouth: each delivery gains field 14 reply_to = nil or [event_id, sender, excerpt] (follow-up chat-s6294-6296).

  • Asked by chat_pending_request.v3 (the v1 tuple). Behind CHAT_PENDING_V4=1, default off; off, that kind is refused exactly like any unknown kind (pinned by a byte-equality test). v1/v2/v3 bytes unchanged and still pinned by the existing goldens.
  • sender is the quoted author's Matrix id. Excerpt is the first 240 code points (not bytes); nil for redacted or non-text events (id and sender kept). reply_to is nil when the target is unreadable, in another room, or a thread fallback pointer.
  • reply_to counts toward each delivery's size in the 256 KiB page; an unencodable delivery is skipped without breaking the page.
  • Golden bytes: tests/fixtures/persona-chat-v6/ (.msgpack and .hex), drift-checked by the runtime tests. Layout in docs/bridge.md "Reply link".

Tests: 264 pass (249 before). Not merged, not deployed; Huginn must read the 15-field delivery before the flag is turned on.

🤖 Generated with Claude Code

Adds `chat_pending.v4` to the persona Matrix mouth: each delivery gains field 14 `reply_to` = nil or `[event_id, sender, excerpt]` (follow-up chat-s6294-6296). - Asked by `chat_pending_request.v3` (the v1 tuple). Behind `CHAT_PENDING_V4=1`, default off; off, that kind is refused exactly like any unknown kind (pinned by a byte-equality test). v1/v2/v3 bytes unchanged and still pinned by the existing goldens. - sender is the quoted author's Matrix id. Excerpt is the first 240 code points (not bytes); nil for redacted or non-text events (id and sender kept). reply_to is nil when the target is unreadable, in another room, or a thread fallback pointer. - reply_to counts toward each delivery's size in the 256 KiB page; an unencodable delivery is skipped without breaking the page. - Golden bytes: `tests/fixtures/persona-chat-v6/` (.msgpack and .hex), drift-checked by the runtime tests. Layout in docs/bridge.md "Reply link". Tests: 264 pass (249 before). Not merged, not deployed; Huginn must read the 15-field delivery before the flag is turned on. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Each v4 delivery is the 14 v3 fields plus reply_to = nil or [event_id, sender, excerpt]:
the quoted author's Matrix id and the first 240 code points of its text, nil excerpt for
a redacted or non-text event, nil reply_to for an unreadable or foreign-room target.
Asked by chat_pending_request.v3, served only with CHAT_PENDING_V4=1; off, that kind is
refused as any unknown kind. v1-v3 bytes unchanged. Golden bytes in persona-chat-v6.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Soul findings on #63: an edited target excerpts as nil; a cached target is re-read after 60 s so a
redaction shows; the target's own rich-reply fallback is dropped; control and bidi characters are
removed and line breaks collapsed before the 240 cap; the env flag parser is exported and pinned.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Bifrost!63
No description provided.