Stage transaction creations without copying full tables per command

This commit is contained in:
2026-11-10 01:30:47 +08:00
parent 198c7f9863
commit fb997f23a8
4 changed files with 66 additions and 1 deletions
+11
View File
@@ -797,3 +797,14 @@ permits reuse. `stats().captured` counts actual dependency captures. Projection
retention also keeps the existing retained row when the incoming node is the same
object in the same lifetime. Both caches remain derived view-owned state; the
full membership scan and paint-grid reconciliation remain present.
Editor create commands now stage transaction-local append views instead of
copying all document tables for every element/canvas. Each view has fixed
membership, so a policy or caller retaining an earlier `getDocument()` prefix
cannot observe later additions. Ordered policy checks, ID/tombstone admission,
record cloning and final document validation remain unchanged. At most 64 new
entries are copied in a staging window before folding to a new read-only base.
The transaction materializes an owned document once before publication; a
non-create command can materialize earlier through the normal change path.
These views are unpublished preparation, not a second document store or durable
queue. Rollback drops them without publishing history, ledger or runtime state.