Module commits
Expand description
The workspace commits an endpoint has seen: one action, every unit it wrote, delivered all together or not at all.
A commit arrives inside the signed payload of each part’s document op
(collab_types::WorkspaceCommit). The gate here holds a part’s event
until every part of its action has arrived, then releases them in the
commit’s own order, so an app never applies half an action and every peer
that can read all parts applies them in the same order. A peer that
receives only some parts keeps the ones it has, undelivered, until the
rest come. A part that comes again on its own — a publisher that sent it
in a later pass, under a commit of its own or none — still completes the
action it was held for, so one action stays one action however its parts
were retried.
The log is also the action log history reads: crate::commit_log::CommitLog
indexes the complete actions and the changes that made them, so a
resource’s history is one index entry and the actions it names.
[Commits::history] names one action with its author, its time, its
invocation and run and every unit change it made; [Commits::history_of]
answers for one resource; [Commits::action_of] gives the whole action a
change belongs to, which is what an undo of one change takes back. The log
is derived from the changes and commits, never persisted: a restarted
endpoint rebuilds it as they arrive again.
Structs§
- Change
Fact - One change of an action, as the log indexes it: the unit it belongs to, the resource its own history entry names, and when it was made.
- Commit
History - One action, as history reads it.
- Commit
Log - The actions this endpoint kept, and the index their queries read.