Skip to main content
The gateway’s webhook idempotency and session history are durable by default — a restart no longer re-processes webhooks or drops history.
When a durable store cannot initialise, the gateway logs, records a redacted 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

No configuration is required — the SQLite idempotency store and the configured session store are used automatically.
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

Run the sanctioned repair, or hot-reload a config that fixes the store path — either clears the degraded entry automatically on the next successful build.

What Happens on Init Failure

When a durable store genuinely cannot initialise, the boundary that owns it (the praisonai-bot wrapper, praisonai_bot.bots._session):
  1. Logs the failure with the raw store path (log only).
  2. Records a gateway / durability:* degraded owner with a redacted reason and the praisonai gateway doctor --fix hint.
  3. Continues serving in-memory so inbound delivery keeps working.
  4. Auto-clears the degraded owner on the next successful (re)build of the durable store.
The two owners:

How to See It

Always printed when degraded_owners is non-empty (not gated on --deep).

Best Practices

Leave store_backend unset (or sqlite). Only set memory for tests or explicitly ephemeral runs, where losing dedup on restart is acceptable.
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.
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.
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.

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.