Reverify source candidates and produce a deterministic complete result. Incremental-source omissions are accepted only when a complete, non-racy, policy- and graph-bound V2 lease exists. The scan source is complete and therefore never relies on omission semantics.
(
source: ChangeSourceResult,
tracked: &[CanonicalTrackedPath],
index: &BTreeMap<RepoPath, FileIndexV2Entry>,
conversion_policy: Hash,
index_write_time: FileIndexTimestamp,
fil
| 230 | /// policy- and graph-bound V2 lease exists. The scan source is complete and |
| 231 | /// therefore never relies on omission semantics. |
| 232 | pub fn verify_candidates<F>( |
| 233 | source: ChangeSourceResult, |
| 234 | tracked: &[CanonicalTrackedPath], |
| 235 | index: &BTreeMap<RepoPath, FileIndexV2Entry>, |
| 236 | conversion_policy: Hash, |
| 237 | index_write_time: FileIndexTimestamp, |
| 238 | filter: &dyn ContentFilter, |
| 239 | canonical_content: F, |
| 240 | ) -> Result<VerifiedCandidateResult, ChangeSourceError> |
| 241 | where |
| 242 | F: FnMut(&RepoPath) -> Result<Hash, ChangeSourceError>, |
| 243 | { |
| 244 | verify_candidates_with_provider( |
| 245 | source, |
| 246 | tracked, |
| 247 | index, |
| 248 | conversion_policy, |
| 249 | index_write_time, |
| 250 | filter, |
| 251 | &RealFilesystemProvider, |
| 252 | canonical_content, |
| 253 | ) |
| 254 | } |
| 255 | |
| 256 | #[allow(clippy::too_many_arguments)] |
| 257 | pub fn verify_candidates_with_provider<F>( |