DecisionManager

Decision Warehouse

Every decision persisted. Zero hot-path overhead.

The decision warehouse captures every execution asynchronously — the caller gets the response as soon as the engine returns, the write happens in the background. KPI dashboards, champion/challenger analysis, and regulatory replay audits all run against the warehouse without touching the live execution path.

Async writer architecture

A dedicated in-process ring buffer drains to PostgreSQL on a separate writer pool — the execution thread pool is never blocked by I/O.

Zero hot-path latency

The caller receives the response as soon as the engine returns. Warehouse persistence happens in background — it does not add milliseconds to the decision round-trip.

No decisions lost on crash

The ring buffer is flushed to a WAL-replayed write-ahead log before the process exits. No decisions are silently dropped during an unclean shutdown.

Writer health is observable

GET /api/health/engine reports warehouse.writer_lag_ms and warehouse.queue_depth. High-water alerts are available for SRE pager integrations.

KPI dashboards

MetricWindow
Decisions executed1 h / 24 h / 30 d
Mean & p99 latency1 h rolling
Error rate (ENGINE_BUDGET_EXCEEDED, etc.)24 h
Budget spend distributionPer ruleset version
Champion/challenger variant splitPer experiment
Writer lag & queue depthLive (health endpoint)

Regulatory replay audits

Content hash proves which logic ran — not just which version

Every execute response includes content_hash in the envelope. The warehouse stores the hash alongside the input payload, execution trace, steps spent, and verdict. When a regulator asks "what decision was made for applicant X on date Y, and why?", the replay reconstructs the full trace from the warehouse — and the content hash proves the exact bytecode that produced it. A version number alone cannot, because versions can be rebuilt.

Decision warehouse is included on every plan

No add-on, no separate license. Start a trial to explore KPI dashboards and replay audits.