Conversation
…known-validation-state
CodSpeed Performance ReportMerging #1543 will not alter performanceComparing Summary
Footnotes
|
| return ValidationState::Valid; | ||
| } | ||
| } else { | ||
| // REVIEW-NOTE: is this the best way to detect that it wasn't validated? should we also check if success/failure is empty if there |
There was a problem hiding this comment.
Does this work? I'm not sure if there will always be no active manifest in validation_results if we did not validate.
There was a problem hiding this comment.
/// Validation status codes for the ingredient's active manifest. Present if ingredient is a C2PA
/// asset. Not present if the ingredient is not a C2PA asset.
#[serde(rename = "activeManifest", skip_serializing_if = "Option::is_none")]
active_manifest: Option<StatusCodes>,
I think it's a safe assumption that if there's no active_manifest then it hasn't been validated, or at the very least it couldn't be determined. The only problem is that we populate the validation results on a Reader::post_validate, so it's possible that normal validation is disabled but since it was post validated the state shows as invalid (or possibly even valid?).
There was a problem hiding this comment.
There has been discussion about separating CAWG (post-)validation results from C2PA validation results. I will put this PR on hold for now until that's addressed.
|
It may be a better idea if we change |
Adds a new Unknown state for when validation is disabled. Previously, the WellFormed state was added in #1490, but its definition, as well as that of asset state, is unclear. Builds off #1541.
See https://spec.c2pa.org/specifications/specifications/2.2/specs/C2PA_Specification.html#_validation_states.