pub struct ValidatorSnapshot { /* private fields */ }Expand description
RAII guard for one validator session’s throwaway checkout. Drop removes
it best-effort — git worktree remove --force (which also deletes the
directory), a dir sweep for anything git declined, and a prune of stale
administrative entries — so pass, fail, tamper-block, or error return
can never leak it.
Implementations§
Source§impl ValidatorSnapshot
impl ValidatorSnapshot
Sourcepub fn validator_set_index_flags(&self) -> Result<Vec<String>>
pub fn validator_set_index_flags(&self) -> Result<Vec<String>>
git ls-files -v inside the snapshot, filtered to the flag tags
(S = skip-worktree, lowercase = assume-unchanged). The snapshot
starts with a fresh, flag-free index, so any flag present after the
session was set BY THE VALIDATOR — hidden modifications that would
corrupt the verdict while leaving no trace once the snapshot is
discarded (4th-pass review). Returns the offending lines (capped)
when any flag is set.
Sourcepub fn create(repo: &GitRepo, path: &Path) -> Result<Self>
pub fn create(repo: &GitRepo, path: &Path) -> Result<Self>
Snapshot repo’s checkout (HEAD + uncommitted diff + untracked
files + warmed target/) into a detached worktree at path.
Idempotent against a stale leftover from a crashed round: any prior
worktree/dir at path is cleared first (mirroring
DisposableWorktree::create’s crash sweep).
Sourcepub fn target_tier(&self) -> TargetCopyTier
pub fn target_tier(&self) -> TargetCopyTier
Which tier warmed the snapshot’s target/.