Repository navigation
test: gate the CEF release tags against their provenance manifests (#2674) - #21
Merged
Merged
Conversation
…2674) Every obs-rust/cef release now ships releases/<tag>.json and each tag points at the commit that adds its own file. This adds the drift gate: for each published release, read the tag's target commit, fetch the manifest at that commit, and assert it describes that release and matches every published asset digest. RED: against the pre-move tag commit (de09a29b1) all three tags have no manifest (404); GREEN: each tag's current commit serves its own manifest, and the whole 25-test suite passes offline except this one, which skips when GitHub is unreachable. The GitHub documents are read in obs_studio_libs/model.py, the repo's single JSON boundary, so tests/test_no_dict_access.py still passes. Refs obs-rust/obs-studio#2674
zackees
commented
Oct 28, 2026
zackees
left a comment
Member
Author
There was a problem hiding this comment.
Coordinator review — verified locally, merging.
- Ran the branch in a clean worktree:
uv run --group dev pytest -q→ 25 passed (includingtests/test_cef_release_provenance.py, 2 network cases),ruff check .andruff format --check .clean. - The gate is meaningful rather than tautological: it resolves the tag through the git-refs API and fetches
releases/<tag>.jsonat that commit, so the pre-#2674 state (all three tags on one docs commit) fails with a 404 instead of silently passing off the default branch — and it skips, not fails, when GitHub is unreachable, which is right for a provenance gate with no local-code surface. tests/test_no_dict_access.pyis respected the right way: the GitHub release/ref documents and the CEF manifest are parsed into frozen dataclasses inobs_studio_libs/model.pyrather than subscripted in the test; the manifest.json parsers are untouched.- Cross-checked against the sibling PR obs-rust/cef#2: all 10 asset digests match the manifests the tags now point at.
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.
Criterion 5 of obs-rust/obs-studio#2674: the drift gate that keeps the CEF release
provenance from rotting again.
obs-rust/cefnow shipsreleases/<tag>.jsonper release and retargets each release tagonto the commit that adds its own file (obs-rust/cef#2). Nothing enforced that, and the
failure it fixes was silent for weeks: all three tags pointed at one unrelated docs commit.
The gate
tests/test_cef_release_provenance.py, for every published release:releases/<tag>.jsonat that commit (not from the default branch — a tagpointing elsewhere has no manifest there, which is the exact pre-#2674 state);
tagis that release, its asset list is exactly the release'sasset list, every
sha256is a well-formed hex digest equal to the digest GitHubcomputes for the published asset, and
patch_commitis recorded (a sha or explicitnull).It skips, rather than fails, when GitHub is unreachable: it is a provenance gate, not a
test of local code. No token needed (public data).
Evidence
de09a29b1: all three tags have noreleases/<tag>.json(404) — the test fails with "release tags do not carry their ownprovenance manifest".
7871,8078,8078-r2each resolve to a commit serving its ownmanifest, and the digests match 11 of 11 assets.
uv run --group dev pytest -q→ 25 passed;ruff check .andruff format --check .clean.Note on
model.pyThe repository's
tests/test_no_dict_access.pyforbids JSON handling outsideobs_studio_libs/model.py, so the GitHub release/ref documents and the CEF manifest areparsed into frozen dataclasses there (
CefReleaseManifest,CefReleaseAsset,GithubRelease,GithubReleaseAsset,parse_git_ref_target) instead of in the test. TheCEF manifest carries free-text fields by design, so it is read leniently; the manifest.json
parsers are untouched.
Refs obs-rust/obs-studio#2674