pub fn plan_capture(
valid: &[String],
cached: &HashSet<String>,
baseline: &HashSet<String>,
max_per_pass: usize,
) -> CapturePlanExpand description
Decide what to capture, from state alone.
valid are the hashes currently valid in the nix store, cached the
hashes the cache already holds, baseline the hashes that existed when
the watcher started (empty for a full backfill).
A candidate is a path that is valid, not cached, and not in the baseline. Order is deterministic (sorted) so a bounded pass is reproducible rather than dependent on hash-map iteration order — an operator re-running a pass against unchanged state gets the same answer.