module documentation
Change-tracking and atomic-transaction machinery for schema mutations.
This module owns the subsystem that sits between schema encoding and schema reporting:
- it is the producer of the data datagraphs.schema_report consumes —
the baseline snapshot (
ChangeTracker.baseline) and the intent-bearing op-log (ChangeTracker.change_log); and - it makes every public schema mutation all-or-nothing via a
footprint-scoped undo journal (
ChangeTracker.atomicplus the stage* helpers and the re-entrancy guardChangeTracker.track).
Separating it from datagraphs.schema.Schema keeps three concerns in
three homes: Schema encodes the domain model, ChangeTracker
tracks and transacts the edits, and schema_report reports them.
ChangeTracker is a tight collaborator of Schema: rollback restores
schema_dict["classes"] in place, so the tracker holds a live reference to the
schema dict it guards. Schema constructs a fresh tracker whenever it rebinds
that dict (the create_from path), keeping the reference current.
| Class | |
Owns a schema's op-log, baseline snapshot, and atomic-rollback transaction. |