storage-layer-is-backend-agnostic-and-safe

IN derived (depth 3)

Both storage backends provide equivalent safety guarantees through backend-appropriate mechanisms: atomic isolated mutations (context-managed load/save for SQLite, per-method transactions for PgApi) and safe hypothetical reasoning (write-flag gating for SQLite, transaction rollback for PgApi), making safety properties independent of backend choice.

Summary

No matter which database backend you pick — SQLite or PostgreSQL — the system's safety promises stay the same. Each backend uses its own technique to keep changes atomic and to let the system explore "what if" scenarios without accidentally saving anything, so switching backends doesn't weaken any guarantees.

Justifications

SL — Backend-agnostic atomicity plus backend-agnostic what-if simulation establish a uniformly safe storage layer

Antecedents (all must be IN):

  • atomicity-is-backend-independent — Both storage backends enforce atomic isolated operations through backend-appropriate mechanisms: the SQLite backend uses context-managed load/save with write-flag gating and per-function transaction scope, while PostgreSQL uses per-method transactions with composite-key multi-tenancy — achieving the same transactional guarantee at different architectural levels
  • both-backends-support-safe-hypothetical-reasoning — Both storage backends enable hypothetical what-if reasoning without permanent mutation: PgApi performs real mutations inside a transaction then rolls back, while the in-memory backend uses write-flag gating to discard speculative changes after analysis

Dependents

These beliefs depend on this one:

Details