hermes-agent/website/docs/user-guide/messaging
Teknium 5854aad8b5
feat(gateway): durable delivery-obligation ledger for final responses (#67181)
A final response generated but not confirmed-delivered was the one
artifact the gateway could lose without a trace: crash or planned
restart between finalize and platform ACK dropped it silently, and the
resume path re-ran the whole turn at full cost (#58818 P1, #41696,
#63695's gateway half).

gateway/delivery_ledger.py records each outbound final response in
state.db (same conventions as the async-delegation ledger: WAL, owner
pid + process-start-time liveness, bounded retention):

  pending -> attempting -> delivered | failed
  startup sweep on dead-owner rows -> redeliver | abandoned

Contract (the lessons from the closed delivery-outbox attempt #61790):
- obligation recorded BEFORE the first send attempt; cleared only on
  SendResult.success (destination acceptance, #51184)
- ambiguity is labeled, never silently retried: rows that were mid-send
  when the process died redeliver with a visible '♻️ Recovered reply —
  may be a duplicate' prefix (honest at-least-once)
- stable ids from session_key + inbound message id + content, so
  distinct threads/topics can never collide
- poison rows bounded: 3 attempts / 24h freshness -> abandoned; claim
  atomically re-stamps ownership so racing sweeps can't double-claim
- redelivery clears resume_pending for the session so the resume path
  never re-runs a turn whose answer the ledger already holds
- best-effort everywhere: ledger failure can never block or delay a send
- slash-command/ephemeral/empty responses are not recorded; cron and
  proactive delivery stay on DeliveryRouter (separate subsystem)

Config: gateway.delivery_ledger (default on; no version bump needed).

Validation: 30 ledger+producer tests; 352 blast-radius gateway tests
green; cross-process E2E (record in process A, kill it mid-send, claim
+ marker + redeliver in a fresh process B against the same state.db).
2026-07-19 00:45:32 -07:00
..
_category_.json feat: add documentation website (Docusaurus) 2026-03-05 05:24:55 -08:00
bluebubbles.md feat(bluebubbles): support group mention gating 2026-06-01 18:52:05 -07:00
dingtalk.md docs: stop recommending pip install; curl installer is the only supported path (#51743) 2026-06-24 00:14:32 -07:00
discord.md fix(discord): harden reconnect message recovery 2026-07-18 14:01:33 -07:00
email.md Make email pairing opt-in 2026-06-21 22:43:57 -07:00
feishu.md feat(gateway): handle Feishu meeting invitations 2026-06-04 06:15:23 -07:00
google_chat.md docs(gateway): document typing_status_text on the Google Chat page 2026-07-18 12:28:59 -07:00
homeassistant.md fix(docs): remove non-existent conversation_entity setting from homeassistant troubleshooting 2026-06-20 20:42:49 -07:00
index.md feat(gateway): durable delivery-obligation ledger for final responses (#67181) 2026-07-19 00:45:32 -07:00
irc.md docs: reconcile docs with code across last 3 releases (#54254) 2026-06-28 12:47:50 -07:00
line.md docs: deep audit — registry drift, stale claims, 2-week PR coverage, dashboard screenshot (#40952) 2026-06-07 01:39:06 -07:00
matrix.md docs: stop recommending pip install; curl installer is the only supported path (#51743) 2026-06-24 00:14:32 -07:00
mattermost.md docs: comprehensive 2-week sweep of feature/PR coverage gaps (#28497) 2026-05-18 23:55:25 -07:00
msgraph-webhook.md docs: deep audit — registry drift, stale claims, 2-week PR coverage, dashboard screenshot (#40952) 2026-06-07 01:39:06 -07:00
ntfy.md docs: reconcile docs with code across last 3 releases (#54254) 2026-06-28 12:47:50 -07:00
open-webui.md chore(scripts): drop Open WebUI local bootstrap script (#56178) 2026-07-01 01:30:40 -07:00
photon.md fix(photon): correct gateway start command (#45566) 2026-06-13 05:14:59 -07:00
qqbot.md docs: round 2 audit — messaging, developer-guide, guides, integrations (#22858) 2026-05-09 15:00:24 -07:00
raft.md feat(gateway): add Raft bundled platform plugin with activity hooks 2026-06-19 07:52:37 -07:00
signal.md docs(signal): clarify tool progress support (#40774) 2026-06-06 18:54:33 -07:00
simplex.md docs: reconcile docs with code across last 3 releases (#54254) 2026-06-28 12:47:50 -07:00
slack.md feat(gateway): live per-tool status line on Slack 2026-07-18 12:28:59 -07:00
sms.md docs: stop recommending pip install; curl installer is the only supported path (#51743) 2026-06-24 00:14:32 -07:00
teams-meetings.md docs: 30-day overhaul — correctness audit, PR coverage, Nous Portal weave, sidebar reorg (#33782) 2026-05-28 02:41:36 -07:00
teams.md fix(teams): package Microsoft Teams SDK as an installable extra (salvage #43945) (#46764) 2026-06-15 14:35:15 -04:00
telegram.md docs: fix 25 documentation/code inconsistencies (audit round 3) 2026-07-16 04:47:40 -07:00
webhooks.md feat(gateway): add webhook payload filters 2026-07-08 08:10:55 -07:00
wecom-callback.md docs: 30-day overhaul — correctness audit, PR coverage, Nous Portal weave, sidebar reorg (#33782) 2026-05-28 02:41:36 -07:00
wecom.md docs(wecom): stop implying live streaming and typing support (#38990) 2026-06-04 05:57:01 -07:00
weixin.md docs: stop recommending pip install; curl installer is the only supported path (#51743) 2026-06-24 00:14:32 -07:00
whatsapp-cloud.md feat(whatsapp): add WhatsApp Business Cloud API adapter 2026-05-23 01:07:01 -04:00
whatsapp.md Merge commit '6110aed9b' into feat/whatsapp-cloud-api 2026-06-10 21:39:22 -04:00
yuanbao.md fix(website): cross-locale doc links + drop empty ko locale (#31895) 2026-05-24 23:16:20 -07:00