21 lines
1.8 KiB
Markdown
21 lines
1.8 KiB
Markdown
# Decision Record: Temporal Graph Persistence Integration
|
|
|
|
## Problem
|
|
Temporal graph nodes were only held in memory; the stub `persistTemporalNode` never touched the SEC-SLURP 1.1 persistence wiring or the context store. As a result, leader-elected agents could not rely on durable decision history and the write-buffer/replication mechanisms remained idle.
|
|
|
|
## Options Considered
|
|
1. **Leave persistence detached until the full storage stack ships.** Minimal work now, but temporal history would disappear on restart and the backlog of pending changes would grow untested.
|
|
2. **Wire the graph directly to the persistence manager and context store with sensible defaults.** Enables durability immediately, exercises the batch/flush pipeline, but requires choosing fallback role metadata for contexts that do not specify encryption targets.
|
|
|
|
## Decision
|
|
Adopt option 2. The temporal graph now forwards every node through the persistence manager (respecting the configured batch/flush behaviour) and synchronises the associated context via the `ContextStore` when role metadata is supplied. Default persistence settings guard against nil configuration, and the local storage layer now emits the shared `storage.ErrNotFound` sentinel for consistent error handling.
|
|
|
|
## Impact
|
|
- SEC-SLURP 1.1 write buffers and synchronization hooks are active, so leader nodes maintain durable temporal history.
|
|
- Context updates opportunistically reach the storage layer without blocking when role metadata is absent.
|
|
- Local storage consumers can reliably detect "not found" conditions via the new sentinel, simplifying mock alignment and future retries.
|
|
|
|
## Evidence
|
|
- Implemented in `pkg/slurp/temporal/graph_impl.go`, `pkg/slurp/temporal/persistence.go`, and `pkg/slurp/storage/local_storage.go`.
|
|
- Progress log: `docs/progress/report-SEC-SLURP-1.1.md`.
|