pgapi-what-if-uses-transaction-rollback

IN premise

PgApi's `what_if_retract` and `what_if_assert` wrap BFS cascade analysis inside a database transaction with `try/finally` guaranteed ROLLBACK, achieving read-only simulation by never committing the exploratory mutations.

Summary

When the system simulates "what would happen if this belief changed," it does so safely by running the full cascade inside a database transaction that always rolls back. This means exploratory what-if queries can temporarily mutate the belief network to compute downstream effects without any risk of corrupting the actual data, since the changes are guaranteed to be discarded.

Details

Sourceentries/2026/04/29/session-summary.md