Persistence
KAVACH separates authoritative relational state from the projected graph and an append-only audit log, each optimized for its role.
Storage Layers
Persistence is split across three layers with clear ownership: the relational store holds authoritative records, the graph store holds a projection for traversal, and the audit log records every state change.
- 01commit relational state
The authoritative policy, subject and decision write completes transactionally.
- 02append audit event
Actor, version and outcome are captured as immutable operational evidence.
- 03project graph state
The graph receives a deterministic downstream projection for traversal.
- 04reconcile projection lag
Any temporary graph lag is detected and converged without blocking the decision.
governed outcome
COMMITTED
Relational truth preserved · audit immutable · graph rebuildable
Relational Store
PostgreSQL is the source of truth for policies, subjects, jobs and decisions. All writes are transactional, and referential integrity is enforced at the schema level.
Graph Store
Neo4j holds the deterministic projection of relational state. It is rebuildable at any time and never accepts writes that do not originate from projection, keeping it strictly downstream of the relational store.
Audit Log
Every mutation appends an immutable record capturing who, what, when and the resulting version. The log is never updated in place, making it a reliable basis for compliance and forensic review.
Rebuildable by design
Because the graph and audit projections derive from relational state, they can be rebuilt after any incident without data loss.Consistency Model
Relational writes are strongly consistent. The graph projection is eventually consistent and converges through continuous reconciliation, so a brief lag in the graph never blocks a decision from committing.
