Make test_sdk_version aware of the RC-preflight ref file - #327
Merged
Merged
Conversation
test_sdk_version compares the loaded native library's version against c2pa-native-version.txt, but an RC-preflight run (per test-c2pa-rs-source-build.yml) actually builds from whatever ref is in c2pa-rs-preflight-ref.txt instead, so the test always failed on that one assertion during a preflight even when everything else passed. parse_native_version() now prefers c2pa-rs-preflight-ref.txt when present, falling back to c2pa-native-version.txt otherwise -- the same precedence the workflow itself uses to decide what to build. Verified both paths locally: green against the pinned 0.90.22 with no preflight file, and green against a c2pa-rc-v0.91.0-rc.3 build with the file present. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
scouten-adobe
added a commit
that referenced
this pull request
Sep 17, 2026
This is the entire diff this PR now carries on top of #327: pin the preflight workflow at c2pa-rc-v0.91.0-rc.3 so it builds from that git tag (no crates.io publish, no prebuilt GitHub release binaries for an RC) and runs the full unit test suite against it. Verified locally and in CI: all 444 tests pass, including test_sdk_version now that #327 teaches it to check against this file during a preflight instead of against the pinned release. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
3 tasks
scouten-adobe
added a commit
that referenced
this pull request
Sep 17, 2026
#328) #327's parse_native_version() fix preferred c2pa-rs-preflight-ref.txt whenever it existed in the checked-out tree. That broke the *real* build.yml jobs on #325: that PR adds the ref file to the branch, so an ordinary tests-unix/tests-windows run (which downloads and installs the actual pinned release, unrelated to the preflight workflow) picked up the file too and wrongly expected the RC's version string, failing with e.g. "'0.91.0-rc.3' not found in '0.90.22'". The file's mere presence was never a reliable signal -- only test-c2pa-rs-source-build.yml's own "Run tests" step actually builds from that ref. Gate on a new C2PA_PREFLIGHT_RUN env var that only that step sets instead. Verified locally: with the pinned 0.90.22 installed and no env var set, all 444 tests pass regardless of whether c2pa-rs-preflight-ref.txt happens to exist in the tree. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #326/#325:
test_sdk_versioncompares the loaded native library's version againstc2pa-native-version.txt, but an RC-preflight run (pertest-c2pa-rs-source-build.yml) actually builds the native library from whatever ref is inc2pa-rs-preflight-ref.txtinstead. That mismatch meant a preflight run always failed this one assertion even when everything else -- including the thing the preflight actually exists to check -- passed cleanly.parse_native_version()now prefersc2pa-rs-preflight-ref.txtwhen present, falling back toc2pa-native-version.txtotherwise -- the same precedence the workflow itself uses to decide what to build.Test plan
c2pa-rc-v0.91.0-rc.3build withc2pa-rs-preflight-ref.txtpresent (all 444 tests pass)🤖 Generated with Claude Code