Expand description
Append-only JSONL decision log writer with optional HMAC hash chaining.
Crash safety: when chained, each record is written to a sibling temp file, fsynced, and atomically renamed into place before the in-memory chain head is advanced. On restart the head is restored from the last record on disk, so a crash between compute and write loses the in-flight record but never leaves the chain head ahead of the file.
Structsยง
- Chained
Record - A record with chain metadata. On disk, the chain fields are at the top level alongside the record fields.
- Decision
Log - Thread-safe append-only JSONL log.
- Rotation
Config - Rotation policy for a
DecisionLog.