Skip to main content

compare_reports

Function compare_reports 

Source
pub fn compare_reports(
    before: &[u8],
    after: &[u8],
    format: ComparisonFormat,
) -> Result<String, ComparisonError>
Expand description

Compares two complete rendered assessment JSON byte strings, without I/O.

The caller must independently decide that comparing the scopes is appropriate. The result labels scope as operator-declared: neither parsing nor matching authenticates the source or establishes equivalent coverage. Imported claim labels remain unendorsed text. A missing item does not mean fixed or resolved.

Matching uses the existing exact fingerprint and compatible capability ID. Local reference renumbering and JSON ordering are not changes. All four groups are mutually exclusive and deterministic; failure returns no partial output. No authoritative runtime model is deserialized or constructed.