Skip to main content

Module sync

Module sync 

Source
Expand description

oxibrain sync <DIR> [--space s] — vault sync with occurrence identity.

Scans DIR recursively for .md/.html files (oxibrain-connectors), classifies each against the ledger’s event-path state for the vault source (oxibrain_core::classify_event), and ingests new/modified files via the event path with derived occurrence IDs (§4.2). The orchestration lives in oxibrain::vault — this command is arg parsing, printing, and transport selection.

Two transports: with the store free, one embedded pass runs in-process. When the daemon holds the P8 advisory lock, the command attaches to it over the default socket and runs the same pass via the sync/run RPC — the daemon is the sole writer, so recurring ingestion is always daemon-hosted (ADR-010).

Occurrence chain: occurrence_id = H(source_id, locator, predecessor, content_hash). A → B → A creates three events because the predecessor differs. Unchanged files are skipped — re-syncing an unchanged tree is a no-op. Legacy episodes (pre-event-identity) participate in Unchanged classification but are never re-ingested.

Functions§

run