Skip to main content

Module approval_store

Module approval_store 

Source
Expand description

SQLite-backed HITL approval store.

Pending requests survive kernel restart because every store_pending call persists into a WAL-journaled SQLite database. Duplicate ids are idempotent only when the serialized payload matches exactly; mismatched retries are rejected so in-flight HITL state cannot be silently overwritten. Resolved approvals and consumed tokens live in the same database so the replay registry survives alongside the pending log.

The store is synchronous; it uses a small r2d2 pool to keep the hot-path query against a cheap connection pool rather than opening a new file handle per call.

Structsยง

SqliteApprovalStore
SQLite-backed ApprovalStore.