Mouth: a v3 send may say resend, honoured only for an id the mouth attempted; else ResendUnknown #90
Loading…
Reference in a new issue
No description provided.
Delete branch "hands/mouth-resend-skips-basis"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Request shape and refusal (for Huginn)
Kind:
gamecult.persona.chat_send_request.v3. Tuple, 6 fields, msgpack array:The first five are exactly the v2 request. Answer: the existing
gamecult.persona.chat_send_receipt.v2[request_id, event_id|nil, refusal|nil, newer].New refusal:
ResendUnknown(in the v2 receipt only; the v1 receipt and the typed refusal document do not know it;neweris empty). It means the mouth cannot vouch for the earlier send, and it posted nothing. Record the line as unknown (not sent, not known to have gone out) and tell her.The mouth honours
resend: trueonly when it attempted thatrequest_iditself, for the same Persona and the same room, less than 25 minutes ago (measured from the first PUT attempt; a resend does not renew it). OtherwiseResendUnknown: a forgotten id, one older than 25 minutes, one attempted for another room or Persona, one lost to a mouth restart. The record is in memory only, at most 500 ids per Persona, oldest forgotten first (which only turns a resend intoResendUnknown).Golden bytes:
tests/fixtures/persona-chat-v2/gamecult.persona.chat_send_request.v3.resend.msgpackand.first-try.msgpack.Behaviour
PersonaMismatch,Brake,EmptyText,UnknownRoom, the room gate.basisis ignored on a resend. A non-resend still getsRoomMoved.resendwas an unowned bypass (high) and had no age bound (medium).Tests
tests/persona-matrix-mouth-send-gate.test.mjs(fake homeserver that dedupes txn ids like Synapse; injected clock):SendFailed, someone answered): same event, no head read, nothing new;ResendUnknown, no PUT;ResendUnknown;ResendUnknown, no PUT;RoomMoved; resend still answersPersonaMismatch/UnknownRoom/Brake;Runtime test: v3 golden fixtures, arity and boolean checks,
ResendUnknownround-trips the v2 receipt and is refused by v1, the RUDP endpoint answers v3 with the v2 receipt.Suite (Yggdrasil, CultLib 286a9af3 with cultcache-ts and cultnet-ts built):
node --test tests/persona-*.test.mjs tests/*mouth*.test.mjs: 342 tests, 341 pass, 1 fail: the filetests/persona-feedback-cli.test.mjs, which needscultmesh-ts(does not build at that CultLib commit); Soul found it fails identically on base5d9fc14.Docs: "Send requests" in
docs/bridge.md. JS only, no new targets or dependencies.🤖 Generated with Claude Code
Mouth: a v3 send may say resend; a resend skips the basis checkto Mouth: a v3 send may say resend, honoured only for an id the mouth attempted; else ResendUnknown