Skip to content

Conversation

@ok-nick
Copy link
Contributor

@ok-nick ok-nick commented Oct 30, 2025

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.

@ok-nick ok-nick requested a review from gpeacock October 30, 2025 17:23
Base automatically changed from ok-nick/validation-state-simple to main November 4, 2025 23:03
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 6, 2025

CodSpeed Performance Report

Merging #1543 will not alter performance

Comparing ok-nick/unknown-validation-state (aadcb02) with main (f6f8998)

Summary

✅ 16 untouched
⏩ 2 skipped1

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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
Copy link
Collaborator

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.

Copy link
Contributor Author

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?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants