pg-what-if-uses-transaction-rollback

IN premise

`what_if_retract`/`what_if_assert` perform real mutations inside a transaction, collect cascade effects, then rollback — reusing the propagation engine without duplicating logic.

Summary

The "what if" analysis features work by actually making changes to the database inside a transaction, observing what would happen as effects cascade through the system, and then rolling everything back so nothing is permanently altered. This is a clever design choice because it means the hypothetical reasoning uses the exact same propagation logic as real operations, avoiding the need to maintain a separate simulation engine that could drift out of sync.

Dependents

These beliefs depend on this one:

Details

Sourceentries/2026/04/29/reasons_lib-pg.md