-
Notifications
You must be signed in to change notification settings - Fork 110
feat: add Unknown validation state #1543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// 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?).
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.