Skip to main content

Module sync_activity

Module sync_activity 

Source
Expand description

The Vault’s activity as sync records (docs/specs/SPEC_VAULT_SHARED_ACROSS_MACHINES_LAN_AND_CLOUD_2026_11_01.md section 6.7): append-only per machine, so lines from different machines never conflict.

A line is named by its machine and its sequence number there, and never changes. A machine keeps its own hash chain over its own lines (storage::vault::activity_hash); the lines of other machines are kept beside them, without that chain, and shown with a Machine column. A line holds no value, but its label and target are sealed like any record.

Structs§

ActivityBody
An activity line as a sync record carries it. It leaves out what is the machine’s own bookkeeping: the order in its table and its place in its hash chain.

Functions§

merge
What to do with a line that arrives: a line this machine already has changes nothing, and any other is added. A line never conflicts, because no two machines make the same (machine, sequence).
parse_record_id
The machine and sequence an activity record id names, or None for any other id.
record_id
The id of the line seq made on machine: a.<machine>.<seq>, letters, digits and ._- as a sealed record’s id may hold. The sequence has no dot, so the id reads back one way only.