Should on-hand quantity be authoritative or derived from stock transactions?
- Store only a mutable on-hand quantity
- Keep immutable transaction entries and a reconciled materialized balance
Choose: Keep the transaction entries authoritative and materialize the balance for fast reads. Reconcile the materialized value against the ledger and repair only from reviewed entries.
Tradeoff: A mutable quantity is simpler at first but loses causality and makes retries, audit, and recovery ambiguous. A ledger adds transaction and reconciliation work but makes each balance explainable.
