import-two-phase-truth-maintenance
IN premise
Import/sync adds all nodes first, then runs `recompute_all()` to propagate truth values, then performs explicit retractions — this ordering prevents incorrect cascades from partially-constructed networks
Summary
When loading or syncing belief data from an external source, the system follows a careful three-step sequence: first it loads all the nodes into the network, then it recalculates which ones should be believed based on the complete picture, and only after that does it process any retractions. This matters because if retractions were processed while the network was only half-loaded, nodes might get incorrectly marked as unsupported simply because their justifications hadn't been imported yet, leading to cascading errors that would be difficult to undo.
Dependents
These beliefs depend on this one:
- bootstrap-bypasses-incremental-propagation — Both persistence loading and import construct the full node graph before truth maintenance — load trusts stored truth values and skips propagation entirely, while import adds all nodes then propagates via recompute_all — sharing a bulk-construction pattern that avoids per-node incremental propagation.
- import-handles-heterogeneous-truth-states — The import pipeline handles mixed truth states: OUT/STALE beliefs arrive without justifications, topological sort tolerates cycles, and two-phase truth maintenance reconciles everything post-import
- import-ordering-ensures-correct-final-state — Import follows a deliberate ordering discipline — add nodes first, propagate truth values second, apply explicit retractions last — ensuring deferred retractions correctly override any truth values that propagation would compute, producing a final state that respects both structural dependencies and explicit intent.
Details
| Source | entries/2026/04/23/reasons_lib-import_agent.md |