Expand description
Backend-neutral provenance record.
Two persistence shapes exist today — commit-message trailer
(git-branch backend) and JSONL line (folder backend’s
.memstead/changes.jsonl) — and historically each backend modelled
its mutation log with its own type. After the workspace-store
rebuild both adapters construct (and are read into) this single
Provenance record so memstead_changes_since returns
identically-shaped values regardless of which backend serves the
queried mem.
This module ships the shape; the read/write wiring on each
backend lands as that backend gains a crate::backend::MemBackend
implementation. The existing crate::filesystem::changelog
ChangeEntry / MutationKind pair stays as the folder backend’s
on-disk encoder until that wiring lands; the two are kept in
lockstep by deliberate field correspondence (timestamp, kind,
entity, actor, client, note).
Structs§
- Provenance
- One mutation event in a mem’s provenance log.
Enums§
- Provenance
Kind - Mutation kind written to provenance. The string forms produced by
Self::as_strare the wire shape — readers and external tools (jq, grep) branch on them.
Functions§
- mint_
logical_ operation_ id - Mint a fresh
logical_operation_id. Combines a nanosecond- precision timestamp with a process-monotonic counter so two ids produced in the same nanosecond are still distinct, and the timestamp prefix gives consumers a rough ordering hint without a dedicated comparator. Mirrors the shape ofmake_commit_idin the filesystem backend.