Expand description
Mutation journal for device-owned replication.
Provides a durable, contiguous, append-only journal that wraps existing semantic-memory mutation paths. Each journal entry records:
- device/store identity
- monotonic sequence number
- operation kind (add_fact, add_message, etc.)
- canonical payload for replication
The journal is committed atomically with the semantic mutation in the same SQLite transaction. Export and replay operations provide the foundation for device-primary → server-replica synchronization.
Structs§
- Exported
Batch - A batch of journal entries ready for replication.
- Journal
Entry - A single journal entry representing one semantic mutation.
Enums§
- Replay
Outcome - Outcome of replaying a journal entry.
Constants§
- MIGRATION_
V37 - V37 migration: mutation journal for device-owned replication.
Functions§
- append_
journal_ entry - Append a journal entry within an active transaction.
- export_
contiguous - Export a contiguous range of journal entries.
- mutate_
and_ journal - Execute a mutation closure within a transaction that also journals it.
- next_
expected_ sequence - Get the next expected sequence number for a device/store pair.
- replay_
journal_ entry - Apply a single journal entry on a replica store.