Expand description
An entry’s history: one row for every change to it and every use of it, in db_vault_activity
(docs/specs/SPEC_VAULT_PARITY_ENTRY_HISTORY_REASONS_AND_IMPORT_2026_11_06.md §5).
A row says who, what, where, under which version of the value, and why (the agent’s own reason), and never holds a value, a tail, a length or a hash of one. Rows are chained: each carries the hash of the one before, and the newest row’s place is also kept in the OS keychain, so a row edited, removed or slipped in by someone with only the database is found. That is evidence for the person, not proof against someone who holds the database and the keychain both.
Structs§
- Head
- The place in the chain the keychain holds.
- Vault
Chain - Where the chain stands, for the pane.
- Why
- What an event adds to its row besides what the row already says.
Enums§
- Asker
- Who is asking for a history.
Constants§
- MAX_
REASON - MAX_REF
- MAX_
REFS - An event has at most this many references, each at most
MAX_REFcharacters. - MAX_
ROWS - The most rows one history answers with.
- MIN_
REASON - A reason has at least this many characters, and at most
MAX_REASON, on one line.
Functions§
- actor_
kind agent,person(the pane) orsrv(a sweep, an expiry reminder).- actor_
label - The actor as a row keeps it: an agent is written
agent:<id>, so a row for an agent named like the person or the system can’t be read as theirs. The person, the system, AgentMux’s own parts (a label with a space, orAgentMux) and a label that already has a kind (drone:<id>) stay as they are, and an older row without the prefix still reads as an agent. - agent_
of - The agent a row names, without the kind its actor is written with. A row from before the kind was written has none.
- append
- Fills in what the history keeps on every row (who kind of actor, the machine, a clean reason and references), appends it to the chain, and notes the chain’s new head. A failure is logged, not raised: a use or a change never fails for want of a history line.
- check
- Where the chain stands now: the whole table walked, and the keychain’s head compared.
- history_
for - An entry’s history, newest first: every change and use since it was made.
agentis the proven agent asking (Nonefor one that isn’t, which sees what every agent may), or the person’s pane (person, which may see all). - one_
line texton one line, trimmed and clipped tomaxcharacters.- refs_of
- The references of a row, as a list.
- refs_
text - The references as the row keeps them: up to
MAX_REFS, each on one line, empty ones dropped. - require_
reason - The reason an agent gives for using or changing an entry, checked before anything is asked or written:
one line of
MIN_REASONtoMAX_REASONcharacters. The error is what to tell the agent. - verify_
chain - Walks
rows(oldest first) and says whether the chain holds, and whetherheadis a row in it.