Skip to main content

verify_archive

Function verify_archive 

Source
pub async fn verify_archive(
    store: &Arc<dyn ObjectStore>,
    request: &VerifyRequest,
    trusted: &TrustedManifestKeys,
) -> Result<ArchiveVerifyReport, WormError>
Expand description

Verifies every partition the request selects.

The walk stops at the first break per partition and keeps going with the other partitions, so one damaged partition does not hide the state of the rest. It does no recovery and no truncation, so tail damage stays visible. The report is deterministic: two runs against an unchanged archive produce equal values.

§Errors

WormError only when the archive cannot be listed, a manifest object cannot be read, or — under VerifyDepth::Deep — a listed object body cannot be fetched. A tampered archive is a successful call with ok == false: “I could not look” and “I looked and it is broken” are different outcomes, and the exit-code grading depends on the difference.