7. Consolidation
The WAL grows by one line per change.
Esta página está em inglês; a tradução está a caminho.
The WAL grows by one line per change. Consolidation folds it into the tree (ud consolidate, or the command
“UI Designer: Consolidate the Event Log”):
- The document is computed as in 6.1, including all repairs.
- Long fractional keys are shortened. Among siblings where any key is longer than 8 characters, all keys are rewritten to short, evenly spaced keys in the same order (ties resolved by id).
- Derived values found in the tree are dropped (4.5); properties equal to their default are dropped.
- Unused metadata is dropped:
tree.assetsentries no node, style or library copy uses; library copies (imported) no node uses;tree.deletedComponentsentries no instance refers to (4.16). - The result becomes the new
tree, written in the stable order of 3.1;tree.seqis the largestseqin the file. - The list becomes the marker alone, with the new
tree.seq, the time of the consolidation, a freshepochand the tree hash (6.9) of the tree just written:
{"seq":18,"at":"2026-10-07T08:00:00.000Z","op":"wal.base","epoch":"ep-4a6c8e0b2d1f","treeHash":"sha256:0b9a8c7d6e5f41322314f5e6d7c8a9b00b9a8c7d6e5f41322314f5e6d7c8a9b0"}What is kept. Every node, style, variable, flow, comment and named version (COL-2); the snapshots of deleted components that instances still use (4.16); unknown fields (PLT-4); the files in the assets folder (consolidation never deletes files).
What is lost. The individual events: the history panel (COL-1) shows events since the last consolidation and named versions; earlier history comes from git. Events with an operation the consolidating build does not know (5.12); the build warns and asks before it consolidates such a file. Conflict reports (6.4): the overlapping runs that carried them are folded away.
When. Nothing consolidates on its own by default. The editor offers it when the WAL has more than 2 000
events, or its text is larger than the tree’s; the setting ud.wal.autoConsolidate (default false) makes a
save consolidate at those thresholds. Because a consolidation rewrites most lines of the file, it is a change
git cannot merge with anything else (a reader refuses the result of such a merge, 9.4): consolidate on the main
branch, with no open branch that changes the design, and commit it on its own.
Shortened keys and open branches. A branch whose events carry keys made before the consolidation still applies after it, but a node it inserted between two siblings whose keys were rewritten may land at another place among them. This is one more reason to consolidate only when no branch is open.