Expand description
Oath drift detection — port of drift.ts / Drift.java. A paragraph the
committed varar.lock.json baseline recorded as an example that now matches no
step. Byte-identical to the other ports (FNV-1a fingerprint, insertion-ordered
lockfile serializer, Jaccard word-similarity re-identification).
Structs§
- Baseline
Example - One example-producing paragraph, as recorded in the baseline.
- Drifted
- A paragraph the baseline says was an example and now matches no step.
- Lock
File - The whole
varar.lock.json: every oath keyed by its POSIX path. - Oath
Baseline - The committed baseline for one oath file.
Constants§
- SIMILARITY_
THRESHOLD - The word-similarity threshold for re-identifying a moved/reworded example.
Traits§
- Baseline
Store - Persistence port for
varar.lock.json. The core owns the format; adapters move only raw text.
Functions§
- derive_
oath_ baseline - The full baseline record for an oath: fingerprint plus live examples.
- detect_
drift - Paragraphs the baseline recorded as examples that now match zero steps.
- live_
examples - The current example-producing paragraphs, in document order.
- message
- The human-readable message for a drift.
- parse_
lock_ file - Parses
varar.lock.json;Noneon malformed input (treated as no baseline). - prune_
baselines - The whole-lock counterpart of
reconcile_drift, run ONCE per run rather than per oath: reconciliation cannot see paths that no longer exist, so without this the lock silently accumulates dead entries and stops being a faithful inventory of the oath set (#70). - prune_
lock_ file - Drops every baseline whose oath path is not in
keep_paths— the entries left behind when an oath is deleted or moved. Pure counterpart ofparse_lock_file/stringify_lock_file; the caller decides what “still exists” means. - reconcile_
drift - One oath’s baseline reconciliation against a
BaselineStore.updateaccepts all drift; otherwise detect drift and rewrite the baseline only on a clean run. - stringify_
lock_ file - Serializes
varar.lock.jsondeterministically (fixed field order, sorted oath paths, two-space indent, trailing newline) — NOT [crate::canonical_json].