Skip to main content

invalidate_identity

Function invalidate_identity 

Source
pub fn invalidate_identity(home: &Path, cache_dir: &Path)
Expand description

Forget the recorded source identity for cache_dir, so the next ensure_fresh call cannot skip its clean on the strength of a stale match.

For a builder that does not itself have one coherent (worktree, head) to record - an implement or fix wave, where several different worktrees deliberately share the cache concurrently - there is nothing correct to write in place of the old identity. Removing the record is still correct: it costs the next tracked caller (ensure_fresh at e2e/gate) one clean it might not have strictly needed, in exchange for never trusting a match against a write this module never observed. Best-effort: a stale record surviving a failed removal is no worse than the record this replaces.