Files
wifi-densepose/docs/adr/coherence-engine/ADR-CE-004-signed-event-log.md
ruv d803bfe2b1 Squashed 'vendor/ruvector/' content from commit b64c2172
git-subtree-dir: vendor/ruvector
git-subtree-split: b64c21726f2bb37286d9ee36a7869fef60cc6900
2026-02-28 14:39:40 -05:00

43 lines
1.1 KiB
Markdown

# ADR-CE-004: Signed Event Log with Deterministic Replay
**Status**: Accepted
**Date**: 2026-01-22
**Parent**: ADR-014 Coherence Engine Architecture
## Context
For audit, debugging, and compliance, the system must support:
- Complete reconstruction of any past state
- Verification that events were not tampered with
- Replay for testing and analysis
## Decision
**Signed event log with deterministic replay.**
Every event is:
1. Assigned a monotonic sequence ID
2. Serialized with timestamp and payload
3. Signed with Blake3 hash including previous event's signature (chain)
4. Stored append-only in PostgreSQL
Replay:
- Start from genesis or checkpoint
- Apply events in sequence order
- Deterministic: same events → same state
## Consequences
### Benefits
- Tamper-evident: any modification breaks the hash chain
- Complete auditability: reconstruct any historical state
- Debugging: replay and inspect at any point
### Risks
- Storage grows indefinitely (mitigated by checkpoints)
- Replay time scales with history length
## References
- ADR-014: Coherence Engine Architecture, Section 13