Add atomic circuit update commands

This commit is contained in:
2026-07-23 21:32:25 +02:00
parent b79faed320
commit 296cb0f1c4
17 changed files with 940 additions and 167 deletions
@@ -149,11 +149,18 @@ Completed foundation:
history records atomically
- revision appends use an expected-revision compare-and-set and reject stale
callers without writing partial history
- a first internal `circuit.update` command validates project/list/section
ownership and equipment-identifier uniqueness inside its transaction
- circuit updates derive their inverse from the persisted pre-command row and
commit the domain update, inverse command, change set and revision together
- integration tests apply the generated inverse as a new `undo` revision and
verify rollback for stale revisions and late history failures
Remaining constraints before implementing history:
- define concrete project-scoped command unions and executors independently
from React callbacks; the generic versioned command envelope is complete
- extend the concrete project-scoped command union and executors beyond the
internal `circuit.update` slice; the generic versioned command envelope is
complete
- route domain writes and revision recording through one shared project
transaction boundary; the current revision repository only commits history
records and the counter together