gateway / durability:* degraded owner, and keeps serving in-memory so inbound delivery never stops.
What’s Durable, Out of the Box
Both survive a routine gateway restart. Webhook dedup keys persist across a redelivery window, and session history is not dropped when the process cycles.
Durability is the default (Issue #4339). Previously the webhook idempotency store was in-memory, so a restart inside a provider’s retry window could re-process a redelivered webhook (duplicate reply, duplicate tool action).
"memory" is now an explicit opt-out.Quick Start
1
Start the gateway — durable by default
2
Opt out for tests / ephemeral runs
"memory" keeps the old in-memory behaviour when you don’t want an on-disk store.3
See a degraded fallback
If a durable store cannot initialise, the boundary keeps serving in-memory and records a degraded owner:It surfaces in
praisonai gateway status under Degraded: and in GET /health under degraded_owners.4
Recover
What Happens on Init Failure
When a durable store genuinely cannot initialise, the boundary that owns it (thepraisonai-bot wrapper, praisonai_bot.bots._session):
- Logs the failure with the raw store path (log only).
- Records a
gateway/durability:*degraded owner with a redacted reason and thepraisonai gateway doctor --fixhint. - Continues serving in-memory so inbound delivery keeps working.
- Auto-clears the degraded owner on the next successful (re)build of the durable store.
How to See It
- CLI
- Health endpoint
- Agent tool
degraded_owners is non-empty (not gated on --deep).Best Practices
Keep the default — durable — in production
Keep the default — durable — in production
Leave
store_backend unset (or sqlite). Only set memory for tests or explicitly ephemeral runs, where losing dedup on restart is acceptable.Alert on any durability:* owner
Alert on any durability:* owner
A
durability:idempotency or durability:session entry in degraded_owners means state is not surviving restart. Alert on it the same way you alert on a degraded channel or provider.Recover with the sanctioned action
Recover with the sanctioned action
praisonai gateway doctor --fix is the one command in the retry_hint. A hot-reload that repairs the store path also clears the entry automatically — no manual clear step.Trust the redaction
Trust the redaction
The operator-facing
reason never contains the raw store path — that stays in the log. Safe to render straight to a dashboard or status probe.Related
Gateway Hooks
Webhook idempotency configuration and the durable-by-default dedup store.
Gateway Session Persistence
The configured session store that backs durable session history.
Degraded Capabilities
The unified
degraded_owners surface these durability facts join.Gateway CLI
gateway status Degraded: section and gateway doctor --fix.
