Skip to content

Conversation

@gpeacock
Copy link
Collaborator

@gpeacock gpeacock commented Jul 29, 2025

The c2pa_rs SDK will now generate v2 claims by default, aligning with the c2pa 2.2 specification. You can still generate v1 claims (c2pa 1.4), when requested but they will be deprecated soon. However, the SDK will continue to support reading and validating v1 claims and v1 ingredient claims.

  • We support saving a store that was just loaded (no added signature).
  • The verify_after_sign setting now verifies the entire manifest, not just the signature.
  • Fixed support for assertions vs databoxes in some cases.
  • We won't generate the claim_generator field for v2 claims (claim_generator_info only).
  • Removed support for adding claim metadata (it will be ignored).

For actions:

  • We now support actions.parameters.ingredientIds to replace org.cai.ingredientIds since we don't own cai.org domain. Neither of those parameter values are written to the store action once they are converted to an ingredients array.
  • Added Actions try_from(str) to convert a string into an Action
  • Added an actions.ingredients() method to return hashed_uris since they are difficult to parse from values.

Added the following to Builder:

  • DigitalSourceType enum.
  • Create constructor using DigtitalSourceType.
  • Update constructor for auto parent ingredient generation.
  • BuilderFlow Enum to keep track of the Builder constructor mode.
  • Builder.add_action() method to add an individual action from a serializable.

Error messages:

  • Fixed status tracker validation info/error message.
  • ClaimDecoding error now has a detailed message string to help with debugging.

For tests:

  • Added test_settings.toml with certs and trust lists for running unit tests.
  • Updated many unit tests and integration tests for v2 compatibility and Settings API.
  • Added test_to_and_from_jumbf for store
  • Disabled the unresolvable_did unit test since it was timing out on every run.
  • Updated make_test_images to produce v2 claims and updated all the known good v2 JSON samples.

@codecov
Copy link

codecov bot commented Jul 29, 2025

Codecov Report

❌ Patch coverage is 81.79551% with 73 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.05%. Comparing base (5fc4767) to head (ee3401b).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
sdk/src/builder.rs 88.16% 20 Missing ⚠️
make_test_images/src/make_test_images.rs 41.66% 14 Missing ⚠️
sdk/src/reader.rs 53.84% 12 Missing ⚠️
sdk/src/claim.rs 80.76% 10 Missing ⚠️
sdk/src/assertions/actions.rs 78.37% 8 Missing ⚠️
sdk/src/ingredient.rs 78.12% 7 Missing ⚠️
c2pa_c_ffi/src/error.rs 0.00% 1 Missing ⚠️
sdk/src/store.rs 96.77% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #1266    +/-   ##
========================================
  Coverage   80.05%   80.05%            
========================================
  Files         151      151            
  Lines       43204    43400   +196     
========================================
+ Hits        34588    34746   +158     
- Misses       8616     8654    +38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@crandmck crandmck added the needs-doc Any change that affects user documentation label Jul 30, 2025
Copy link
Collaborator

@scouten-adobe scouten-adobe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whew! That was a lot of work and very well done. I do (shocker) have a few suggestions and change requests.

@gpeacock gpeacock requested a review from ok-nick July 31, 2025 22:17
Copy link
Collaborator

@scouten-adobe scouten-adobe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates and the follow-ups in related PRs. I'm 👍 now.

@ok-nick
Copy link
Contributor

ok-nick commented Aug 1, 2025

As a reminder, let's get #1260 and #1274 merged first, both should be ready.

@gpeacock gpeacock merged commit 89bafcc into main Aug 1, 2025
38 checks passed
@gpeacock gpeacock deleted the gpeacock/v2_default branch August 1, 2025 16:11
@caiopensrc caiopensrc mentioned this pull request Aug 1, 2025
@crandmck crandmck mentioned this pull request Aug 4, 2025
ok-nick pushed a commit that referenced this pull request Aug 11, 2025
feat: Use V2 Claims by default
updates the unit tests to work with V2 by default
bump min rust version to 1.86
The c2pa_rs SDK will now generate v2 claims by default aligning with the c2pa 2.2 specification>
v1 claims (c2pa 1.4) generation is still available when requested but may be deprecated soon.
Reading, validating and ingredient support for v1 claims will continue to be supported.
We now support actions.parameters.ingredientIds to replace org.cai.ingredientIds (due to not owning cai.org.
Neither of those parameter values will be written to the store action once they are converted to an ingredients array.
added Actions try_from(str) to convert a string into an Action
added an actions.ingredients() method to return hashed_uris since they are difficult to parse from values.
updated make_test_images to produce v2 claims and updated all the known good v2 json samples
ClaimDecoding Error now has a detailed message string to help with debugging.
We support saving a store that was just loaded (no added signature)
verify_after_sign setting now will verify the entire manifest, not just the signature.
Fixed support for assertions vs databoxes in some cases.
added test_to_and_from_jumbf for store
disabled the unresolvable_did unit test since it was timing out on every run.
Added DigitalSourceType Enum to builder
Added Builder Create constructor using DigtitalSourceType
Added Builder Update constructor for auto parent ingredient generation
Added BuilderFlow Enum to keep track of the Builder constructor mode.
Added Builder.add_action method to add an individual action from a serializable.
do not generate the claim_generator field for v2 claims (claim_generator_info only)
remove support for adding claim metadata (it will be ignored)
fixed status tracker validation info/error message
Added test_settings.toml with certs and trust lists for running unit tests.
Updated many unit tests and integration tests for v2 compatibility and Settings api.
@caiopensrc caiopensrc mentioned this pull request Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-doc Any change that affects user documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants