api-uses-with-network-context-manager

IN premise

`api.py` uses a `_with_network` context manager to ensure load-operate-save atomicity for all network mutations.

Summary

All code in api.py that modifies the belief network goes through a single context manager that loads the current state, lets the operation run, and then saves the result. This guarantees that no mutation can partially complete — if anything fails mid-operation, the network stays in its previous consistent state, preventing corrupted or half-applied changes.

Dependents

These beliefs depend on this one:

Details

Sourceentries/2026/04/23/scan-ftl-reasons.md