Skip to main content

Module journal

Module journal 

Source
Expand description

The edit spine: mere’s captured-delta stream as a muniment journal, replayed into the graph (the substrate’s append-only-log primitive over mere’s own edit vocabulary). See graph/journal.rs. The edit spine: mere’s captured-delta stream over the substrate log.

The graph’s durable mutations already exist as a stream of CapturedDeltas (stable-id, serializable), emitted through the capture hook as each live GraphDelta applies (see capture.rs). This module gives that stream its principled home: a muniment::Journal of captured deltas, the append-only log primitive shared across the Merely apps. The materialized graph is the replay of the journal, and because live editing and replay both funnel through apply_graph_delta, the two cannot diverge. What an edit reads from the clock or mints (a new node’s visit stamp, a statement id) is journaled beside it, so replay reproduces those too.

This is the edit spine over the substrate. mere keeps its own rich edit vocabulary — CapturedDelta carries content edits (title, tags, body, navigation) that chartulary’s topology-only GraphEdit deliberately cannot express, and muniment supplies the ordered, forkable, persistable log beneath it. Checkpointing reuses mere’s existing GraphSnapshot: load a snapshot, then replay_from the journal tail past its sequence, mirroring chartulary::GraphLog::load_checkpointed.

WASM-clean: muniment is the substrate’s portable persistence primitive (the same ones the browser persists through), so this module compiles to wasm32-unknown-unknown like the rest of graph/.

Structs§

ArchivedAttributedDelta
An archived AttributedDelta
ArchivedAuthor
An archived Author
AttributedDelta
One journal entry: a captured delta in the attribution envelope — the participant-gate plan’s B1 adoption of chartulary’s Batch { author, edits } shape over mere’s edit spine. WHO made a change rides the journal, so a participant’s edits read back attributed and compensable.
AttributedDeltaResolver
The resolver for an archived AttributedDelta
Author
Who or what made a journal entry, and through which application.
AuthorResolver
The resolver for an archived Author
GraphJournal
An append-only journal of a graph’s captured edits: the persisted edit spine. The materialized Graph is the replay of this log; forking it forks the graph’s whole history with provenance, and it persists whole through one muniment slot.

Enums§

ArchivedAuthorKind
An archived AuthorKind
AuthorKind
What kind of author made a change: a person, or a rule, script or engine acting at some version (the ambiance design’s moves between keeping levels record the same four).
AuthorKindResolver
The resolver for an archived AuthorKind

Constants§

USER_AUTHOR
The id the trusted UI’s person records under when the host has no persona to name: see Author::user.

Functions§

journal_capture_hook
A shared journal plus a capture hook that records every emitted CapturedDelta into it. Install the hook with set_captured_delta_hook and keep the handle to replay or persist the journal: