MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / verify_candidates

Function verify_candidates

atomic-repository/src/change_source/scan.rs:232–254  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

230/// policy- and graph-bound V2 lease exists. The scan source is complete and
231/// therefore never relies on omission semantics.
232pub 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>
241where
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)]
257pub fn verify_candidates_with_provider<F>(

Calls 1