Skip to main content

validate_working_set

Function validate_working_set 

Source
pub fn validate_working_set(
    store: &Store,
    since: Option<DateTime<FixedOffset>>,
) -> Result<Vec<Issue>>
Expand description

Loop default. Validate the working set: content files changed since since (default: the last validate entry in log.md), plus any file whose wiki-links target a changed/renamed/removed path. Per-file checks only — never a Store::walk / [Store::walk_content_files]-style parse-the-tree, and none of the cross-file global passes (entity-dedup, every-index sync, log.md ordering) that --all adds.

Cost. The changed set is read from log.md — O(changed): every create/update/ingest/rename/delete/link entry newer than the cutoff names an object. Per-file frontmatter + link-doctrine checks then run over that set plus its incoming linkers — also O(changed). The one part that is not O(changed) is discovering those incoming linkers: a link to a changed path can live in the body or a typed frontmatter field of any file, so it is found by a single embedded-ripgrep pass over the store (Store::find_links_to_any) for the whole changed set at once — one store scan, flat in the changed-set size. (It was previously a full store read per changed object — O(changed × store); that is the blow-up this path no longer pays.) The unavoidable single content scan is the same shape as free-text dbmd search; the sidecar links projection can’t replace it because it omits body/typed-field edges.