Commit Engine Glossary¶
This glossary defines terms specific to the Commit Engine. For Viper Runtime terms, see Viper Glossary.
Core Concepts¶
Term |
Definition |
|---|---|
Dual-Layer Contract |
Commit guarantees structure; application guarantees semantics |
Best-Effort Merge |
Deterministic merge where unresolved mutations become Deterministic No-Op |
Deterministic No-Op |
Mutation completes without effect when path cannot be resolved (industry-standard behavior, same as Google Docs/Figma) |
Divergence |
When concurrent streams modify data incompatibly |
DAG |
Directed Acyclic Graph for commit history and convergence |
Multiplayer Terminology¶
Term |
Definition |
|---|---|
Multiplayer |
Multiple users editing concurrently with automatic merge |
Parallel Editing |
Isolated edits merged at sync time |
Arbitration |
Deterministic merge mechanism (LWW for CommitDatabase) |
Industry Context: By market standards, “collaborative” describes any multi-user system with automatic convergence — CommitDatabase qualifies, as do Figma, Google Docs, Yjs, and Automerge. This glossary uses precise technical terms for clarity.
Commit Types¶
Type |
Description |
|---|---|
|
Normal commit containing ValueProgram |
|
Evaluates the target commit’s opcodes in ignore mode (XArray positions are tombstoned, other opcodes become no-ops). Used for Undo |
|
Re-evaluates the target commit’s opcodes in execute mode (restores normal evaluation). Used for Redo |
|
Combines two concurrent streams by creating a merge commit (no mutations—only references parents). State obtained by linearizing DAG then evaluating opcodes |
ValueOpcode Types¶
Opcode |
Semantics |
|---|---|
|
Replace entire document (dictatorial) |
|
Update at path if document exists |
|
Add elements to set |
|
Remove elements from set |
|
Add/update map entries |
|
Remove map keys |
|
Update existing keys only |
|
Insert at UUID position (CRDT-like) |
|
Update at position if not tombstoned |
|
Clear value at position (tombstone) |
Classes¶
Class |
Definition |
|---|---|
|
Immutable program fragment: header + program (opcodes) |
|
SHA-1 identifier (20 bytes), content-addressable |
|
Metadata: commitId, parentCommitId, timestamp, label, type |
|
Single mutation opcode with target key/path |
|
Collection of ValueOpcode indexed by key and attachment |
|
Readonly state computed by DAG evaluation with cache |
|
Mutable state accumulating mutations before commit |
|
High-level facade managing commits, blobs, definitions, DAG |
|
Backend storage interface (SQLite, Remote) |
|
Network server exposing CommitDatabase via RPC, manages dataVersion |
|
Undo/redo via stack of (commitId, disableCommitId) |
|
Synchronization between databases (Fetch/Push/Full Sync) |
|
Virtual CPU executing opcodes in protected mode ( |
Interfaces¶
Interface |
Definition |
|---|---|
|
Readonly access: |
|
Mutation access: |
See Also¶
Commit Overview - Architecture
The Dual-Layer Contract - Obligations
Commit Patterns - Application patterns
Viper Glossary - Viper Runtime terms