persistence-is-snapshot-not-incremental
OUT derived (depth 1)
The storage layer operates as a full snapshot: save replaces all rows, load trusts stored values without re-propagation, and the dependents index is rebuilt from scratch
Summary
The database acts like a camera snapshot rather than a live journal. Every save overwrites everything from scratch, every load takes the stored values at face value without rechecking them, and internal indexes get reconstructed on the fly. This means the system has no way to persist just what changed, and any corruption or inconsistency in the saved data will be silently accepted as correct when reloaded.
Justifications
SL — Four independent storage behaviors all point to a snapshot-and-rebuild strategy rather than incremental sync
Antecedents (all must be IN):
- storage-save-is-full-replace — `Storage.save()` deletes all rows from every table before re-inserting the entire network; there is no incremental or differential update path.
- storage-trusts-stored-truth-values — `load()` trusts the stored `truth_value` without re-running propagation, making the database the source of truth for node status.
- storage-load-bypasses-propagation — `load()` constructs nodes directly into `network.nodes` rather than calling `add_node`, so truth maintenance propagation does not fire during deserialization.
- dependents-index-derived-on-load — The `node.dependents` set is never persisted to SQLite; it is rebuilt by walking all justification antecedents and outlists during `load()`.
Dependents
These beliefs depend on this one:
- data-integrity-spans-architecture — Data integrity is enforced across all three architectural layers: clean layer boundaries prevent cross-cutting mutations, snapshot persistence ensures atomic state transitions, and conservative staleness checking gates CI pipelines.
- mutation-pipeline-is-atomic-snapshot — Every network mutation follows an atomic snapshot pipeline: API context management ensures load/save atomicity with write-flag gating, while storage performs full-replace persistence — no partial state is ever visible between operations.
- persistence-round-trip-is-lossless — The save/load round trip preserves all network state faithfully: snapshot persistence captures the full graph, stored truth values are trusted without re-propagation, justification insertion order is preserved via rowid, and outlist relationships survive serialization.