Skip to main content

Module sync

Module sync 

Source
Expand description

Vault sync classification — a pure decision function (P9).

Given scanned markdown files and the ledger’s known note content hashes per source path, decide per file whether sync must ingest it (New), skip it (Unchanged — an episode with this exact content already exists), or ingest it as a new version (Modified — the path is known with different content).

The store fetches the KnownNotes map; this module only decides. Modified files append a new episode; the previous episode remains (append-only ledger, P1). Stale claims surface via contradictions and are removed with retract — sync itself never retracts.

Structs§

LocatorState
State of the latest event-path episode for a locator.
SyncFile
A scanned candidate file for sync.

Enums§

SyncAction
What sync must do with one scanned file.

Functions§

classify
Classify scanned files against known notes.
classify_event
Classify scanned files using event-identity state, falling back to legacy content-hash knowledge for locators not yet on the event path.

Type Aliases§

KnownNotes
Known note content hashes per source path, as read from the ledger (store::ledger::note_hashes_by_path).