Skip to content

feat(multimedia): inventory and map codec closure targets for negativo17 and rpmfusion (carries #233) - #302

Closed
castrojo wants to merge 12 commits into
mainfrom
carry/233-multimedia-closure
Closed

castrojo wants to merge 12 commits into
mainfrom
carry/233-multimedia-closure

Conversation

@castrojo

Copy link
Copy Markdown
Contributor

Carries @repires's #233 unchanged (head ce15643). That branch lives on a fork, so its Canary stops at the fork guard (run 36499668401); this in-repo branch lets the Canary run, as #137/#138 did for #109/#100.

What #233 does: adds config/multimedia-closure.toml + tools/multimedia_closure.py to inventory Bluefin's multimedia override and codec closure (38 requirements) and map each to a factory recipe and a named negativo17 / RPM Fusion target spec source, without enabling third-party repositories; imports ffmpegthumbnailer from Fedora Rawhide; adds a multimedia-closure validate job and a non-blocking (continue-on-error) closure report in publish-repository.yml. Addresses, does not close, #230.

State of review on #233: hanthor's 09-25 review ("looks solid") listed rebase, %{?isa} -> %{?_isa}, zstandard hash-pin (minor) and scope. Rebase and %{?_isa} are done (a8d4d40). Merged onto current main (ca55123) locally: pytest tests 834 passed / 2 skipped.

Still open, for @hanthor: his scope question -- whether inventory-only (no override migrated off Fedora dist-git yet) is acceptable progress on #230. Not merging this until a maintainer answers that; the Canary run here only removes the fork-guard blocker.

repires and others added 12 commits September 23, 2026 17:01
…230)

- packages/ffmpegthumbnailer: import recipe and lock source (stage 4)
- config/multimedia-closure.toml: document full multimedia closure requirements,
  set policy to negativo17-multimedia-rpmfusion-nonfree, and map all 12
  multimedia override binaries and codec components to named upstream spec sources
- tools/multimedia_closure.py: deterministic audit of closure against factory recipes
  and upstream spec source validation, with zstd primary.xml decompression support
- reports/multimedia-closure.json: committed audit report
- .github/workflows/validate.yml: add 'Bluefin multimedia closure' check
- .github/workflows/rebuild-rpms.yml: install zstandard in publish job and run
  multimedia closure report with continue-on-error: true
- Justfile: add multimedia recipe and include in check
- tests: unit test coverage and package count assertion bump (373 -> 374)
- docs/skills/multimedia-closure.md: document skill and sourcing contract
- docs/SKILL.md, AGENTS.md: index multimedia-closure skill

Closes #230
Refs #24

Assisted-by: Antigravity <noreply@google.com>
Co-authored-by: Antigravity <noreply@google.com>
Signed-off-by: repires <repires@users.noreply.github.com>
…es, and clarify target parity

- Record actual recipe provenance from .hummingbird-upstream.json in
  resolve() and the committed closure report alongside the target upstream spec source.
- Validate that declared upstream_spec_sources point to negativo17 or
  rpmfusion, and enforce stale check so unused mappings cannot escape detection.
- Remove stale gstreamer1-plugins-ugly and gstreamer1-plugins-bad-freeworld
  from config/multimedia-closure.toml.
- Update docs/skills/multimedia-closure.md and config/multimedia-closure.toml
  policy to document the negativo17/RPM Fusion mappings as target tracking for
  #230 rather than achieved tree properties.
- Add test coverage for recipe provenance inspection, non-negativo17/rpmfusion
  source rejection, and stale upstream spec source rejection in
  tests/test_multimedia_closure.py.

Refs #230
Refs #24

Signed-off-by: repires <repires@users.noreply.github.com>
Anchor repomd primary location lookup on <data type="primary"> to avoid
matching non-primary metadata entries such as primary_db if repomd
ordering varies.

Refs #230

Signed-off-by: repires <repires@users.noreply.github.com>
Enforce startswith('https://github.com/negativo17/') and startswith('https://github.com/rpmfusion/')
on upstream spec source URLs instead of substring check. Add unit test rejecting fork URLs.

Signed-off-by: repires <repires@users.noreply.github.com>
Review of #233 found the inventory overstating parity and the skill
frontmatter overstating sourcing.

- tools/multimedia_closure.py: derive codec_parity per requirement by
  comparing the recipe's .hummingbird-upstream.json provenance against the
  upstream spec source named in [upstream_spec_sources]. `built` says only
  that a recipe emits a binary of that name, and every override recipe is a
  Fedora dist-git import whose codec set is narrower (mesa passes no
  -Dvideo-codecs, libheif disables HEVC, intel-media-driver-free is the free
  variant), so `built` alone read as parity with negativo17 / RPM Fusion.
  The gate now fails when a provenance divergence carries no declared reason,
  prints the requirements still short of parity, and counts upstream_parity
  and fedora_restricted.
- config/multimedia-closure.toml: add [parity.<recipe>] stating the
  restriction each Fedora import carries; stale [parity] keys the transaction
  does not ask for are rejected like stale [upstream_spec_sources] are.
- docs/skills/multimedia-closure.md: reword the frontmatter description from
  "sourced from" to "mapped to target", matching what the body already says,
  and document codec_parity.
- reports/multimedia-closure.json: regenerate.
- tests: cover parity derivation, the undeclared-divergence and stale-[parity]
  failures, and the repository-level assertion that every override declares
  parity against its named upstream.

Refs #230
Refs #24

Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
primary.xml parsing could still traceback out of the publish step: both
ElementTree.ParseError (a SyntaxError subclass) and zstandard.ZstdError
fall outside main()'s except tuple, which is the silent-failure mode the
ImportError wrapping already guards against under continue-on-error.
Wrap both as ClosureError so the cause is named.

Also correct three statements about the inventory:

- the comps definition URL pointed at pagure, which is an archived
  read-only snapshot with no comps-f44.xml.in; the file lives on
  forge.fedoraproject.org.
- gstreamer-plugins-espeak is declared type="conditional"
  requires="gstreamer", not conditional on espeak. It is still not a
  requirement, but for the stated reason.
- a null codec_parity is "no named upstream spec source", not "an
  exception": the built entries outside the override set are null too.

Finally, say in the skill that this maps targets and does not source from
negativo17 or RPM Fusion yet, so #230 is not read as closed by it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
# Conflicts:
#	.github/workflows/rebuild-rpms.yml
#	Justfile
#	tests/test_package_inventory.py
#	tests/test_packit_srpm.py
#	tests/test_render_packit_config.py
#	tests/test_source_inventory.py
…ository.yml

Assisted-by: Gemini via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
%{?isa} is not a defined macro and expanded to nothing, so the main and devel packages' Requires on -libs lost their arch qualifier.

Assisted-by: Claude via omp
Signed-off-by: castrojo <jorge.castro@gmail.com>
@hivecommons-hive

hivecommons-hive Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

🐝 Possible duplicate

This PR changes exactly the same files as #233, which was opened first:

Evidence — identical changed-file set (22 file(s)):

  • .github/workflows/publish-repository.yml
  • .github/workflows/validate.yml
  • .packit.yaml
  • AGENTS.md
  • Justfile
  • config/multimedia-closure.toml
  • config/upstream-sources.json
  • docs/SKILL.md
  • docs/architecture.md
  • docs/skills/multimedia-closure.md
  • …and 12 more

This is a suggestion, not a verdict. Hive will not close, label, approve or merge anything here — a human decides.

It was produced by comparing changed-file sets across open PRs, which is a candidate generator: PRs that share a file are not necessarily the same work. Here the patches DIFFER, so this is the weaker tier: dependency-bump PRs that edit one shared manifest, and unrelated fixes to one busy file, both land in it. Read the diffs before acting.

@hanthor

hanthor commented Sep 29, 2026

Copy link
Copy Markdown
Member

Shepherding note: this now conflicts with main after #296/#300/#301 merged — needs a manual rebase before it can land.

@castrojo

Copy link
Copy Markdown
Contributor Author

Closing as redundant: duplicate carry of #233 created during rebase/merge testing. Canonical review remains on original PR #233.

@castrojo castrojo closed this Sep 29, 2026
@castrojo

Copy link
Copy Markdown
Contributor Author

Reopening: #302 is an in-repo carry branch of fork PR #233. While identical in diff (+2342/-14), leaving both tracked as open until maintainers select the canonical branch for merge.

@castrojo castrojo reopened this Sep 29, 2026
@Danathar

Copy link
Copy Markdown
Contributor

A note on #302 versus #233, since both are open and look identical.

They are no longer the same. #302 is frozen at ce15643. #233 has two more commits on top: 6b396ce (labels non-Fedora provenance honestly and fixes the closure docs) and 78c6af6 (validates the declared parity status). The GitHub compare ce15643...78c6af6 shows #233 two commits ahead across 6 files. Merging #302 as it stands would drop those two review fixes.

Also, the 09-29 note on #233 says #302 has merged. It has not; it is still open, and both PRs now conflict with main.

So whichever branch is kept, it needs 78c6af6 and a rebase before it can land.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This carry is now two commits behind #233. The body says it carries #233 unchanged at head ce15643, and that was true when it was cut — ce15643 is in #233's history. Since then #233 has moved to 78c6af6, adding:

  • 6b396ce fix(multimedia): label non-Fedora provenance honestly …
  • 78c6af6 fix(multimedia): gate the declared parity status and name the codec t…

Concretely, comparing the two diffs (same 22-file set):

  • tools/multimedia_closure.py in #233 is 376 lines vs 357 here; #233 adds a third parity label divergent and fails the check when [parity.<recipe>].status disagrees with the derived parity. This branch has only upstream_parity / fedora_restricted and no status gate.
  • docs/skills/multimedia-closure.md and config/multimedia-closure.toml here still carry the older text for gstreamer1-plugin-libav / gstreamer1-plugins-ugly (RPM Fusion named as the sourced upstream) that #233 reworded to make the Fedora-dist-git closing path and fedora-restricted parity explicit.

So the two PRs are the same change but no longer the same code, and only one can land. Flagging for a maintainer (@castrojo, since you own the carry): either refresh this branch to 78c6af6 so the Canary result reflects what #233 actually is, or — if the Canary run has served its purpose — close this one in favour of #233. I have not closed anything.

The open scope question in the body (inventory-only progress on #230) is unchanged and still needs @hanthor.

Confidence: 3/5 (needs attention) — 1 medium finding; 1 perspective requires a human decision

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Both review findings are fixed and verified locally, but the commit could not be pushed: it touches .github/workflows/publish-repository.yml, and the App token this agent holds is refused (refusing to allow a GitHub App to create or update workflow ... without 'workflows' permission; the Git Data API path is blocked too). A human with push rights needs to apply it.

1. Stale seeded multimedia-closure.json (correctness/medium) — scrub it right after seeding, beside the buildroot snapshot dropped for the same reason, so only a report this run produced can ship:

           rm -f repository/reports/buildroot-*.json
+          # Same shape, same reason: the multimedia closure report names the
+          # NEVRAs *this* publish resolved. Its step is continue-on-error, so
+          # a ClosureError leaves nothing behind to overwrite the seeded copy
+          # and the previous run's NEVRAs would ship in this image as if they
+          # described it -- the "committed stale" outcome that step exists to
+          # avoid. Drop it; only a report this run produced may be published.
+          rm -f repository/reports/multimedia-closure.json

tools/multimedia_closure.py writes --output only after the report is built (main() exits on ClosureError before the write), so there is no partial-write case to keep; absence is the honest outcome. New regression test test_the_seed_drops_the_previous_runs_closure_report asserts the wiring, in the same style as the existing publish-job wiring tests.

2. zstandard not hash-pinned in the signing job (security/low) — new .github/requirements/zstandard.txt pins every Linux wheel plus the sdist for 0.25.0 (71 hashes), installed with --require-hashes --no-deps:

       - name: Install zstandard
-        run: pip install --disable-pip-version-check --quiet 'zstandard==0.25.0'
+        run: |
+          pip install --disable-pip-version-check --quiet \
+            --require-hashes --no-deps -r .github/requirements/zstandard.txt

Verified the hashed install resolves and imports. rebuild-rpms.yml:270 still carries the bare version pin — left alone as out of scope for this PR, and it does not hold id-token: write.

Docs: docs/skills/multimedia-closure.md gains the invariant ("not gating means the report can be absent; it must never be stale").

Gates run locally on the fix: pytest tests 835 passed / 2 skipped, plus validate.py, multimedia_closure.py --check, factory_contract.py, check_workflow_quoting.py — all clean.

Patch to apply (git am):

0001-fix-publish-...patch
From 9129991765e5955f7e71cc32a8306aee11a9b051 Mon Sep 17 00:00:00 2001
From: scanner <scanner@hive.kubestellar.io>
Date: Tue, 29 Sep 2026 14:24:25 -0400
Subject: [PATCH] fix(publish): drop the seeded closure report and hash-pin
 zstandard
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The publish job seeds `repository/` from the previous factory image, which
carries that run's `reports/` with it. The multimedia closure report step is
`continue-on-error`, so a ClosureError leaves nothing behind to overwrite the
seeded copy and the previous run's NEVRAs ship in the new image as if they
described it — the "committed stale" outcome the step exists to avoid. Scrub
it right after seeding, beside the buildroot snapshot dropped for the same
reason, so only a report this run produced can be published. A missing report
is a visible gap; a stale one is a wrong answer.

Also hash-pin the zstandard install. The version pin alone leaves a PyPI-side
substitution surface in a job that holds `id-token: write` and runs
`cosign sign-blob`. `.github/requirements/zstandard.txt` pins every Linux
wheel and the sdist for 0.25.0 and is installed with `--require-hashes
--no-deps`, so pip fails loudly rather than silently accepting a swapped
artifact.

Hive-Fix-Attempt: 1/6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
 .github/requirements/zstandard.txt       | 84 ++++++++++++++++++++++++
 .github/workflows/publish-repository.yml | 15 ++++-
 docs/skills/multimedia-closure.md        |  8 +++
 tests/test_multimedia_closure.py         | 13 ++++
 4 files changed, 119 insertions(+), 1 deletion(-)
 create mode 100644 .github/requirements/zstandard.txt

diff --git a/.github/requirements/zstandard.txt b/.github/requirements/zstandard.txt
new file mode 100644
index 0000000..258cc65
--- /dev/null
+++ b/.github/requirements/zstandard.txt
@@ -0,0 +1,84 @@
+# Hash-pinned, not just version-pinned: the publish job that installs this
+# holds id-token: write and runs cosign sign-blob, so a PyPI-side swap of the
+# artifact under an unchanged version number would run inside it. Covers every
+# Linux wheel plus the sdist for zstandard 0.25.0; pip fails loudly if it
+# resolves to a file not listed here, which is the correct outcome for a
+# runner-image bump that moves Python past these.
+#
+# Regenerate on a version bump (VERSION is the new version):
+#   python3 -c 'import json,sys,urllib.request
+#   d=json.load(urllib.request.urlopen(f"https://pypi.org/pypi/zstandard/{sys.argv[1]}/json"))
+#   print(" \\\n".join(sorted("    --hash=sha256:"+f["digests"]["sha256"]
+#       for f in d["urls"] if f["packagetype"]=="sdist" or "linux" in f["filename"])))' VERSION
+zstandard==0.25.0 \
+    --hash=sha256:011d388c76b11a0c165374ce660ce2c8efa8e5d87f34996aa80f9c0816698b64 \
+    --hash=sha256:01582723b3ccd6939ab7b3a78622c573799d5d8737b534b86d0e06ac18dbde4a \
+    --hash=sha256:05353cef599a7b0b98baca9b068dd36810c3ef0f42bf282583f438caf6ddcee3 \
+    --hash=sha256:06acb75eebeedb77b69048031282737717a63e71e4ae3f77cc0c3b9508320df6 \
+    --hash=sha256:07b527a69c1e1c8b5ab1ab14e2afe0675614a09182213f21a0717b62027b5936 \
+    --hash=sha256:0bbc9a0c65ce0eea3c34a691e3c4b6889f5f3909ba4822ab385fab9057099431 \
+    --hash=sha256:0be7622c37c183406f3dbf0cba104118eb16a4ea7359eeb5752f0794882fc250 \
+    --hash=sha256:10ef2a79ab8e2974e2075fb984e5b9806c64134810fac21576f0668e7ea19f8f \
+    --hash=sha256:1673b7199bbe763365b81a4f3252b8e80f44c9e323fc42940dc8843bfeaf9851 \
+    --hash=sha256:172de1f06947577d3a3005416977cce6168f2261284c02080e7ad0185faeced3 \
+    --hash=sha256:1869da9571d5e94a85a5e8d57e4e8807b175c9e4a6294e3b66fa4efb074d90f6 \
+    --hash=sha256:19796b39075201d51d5f5f790bf849221e58b48a39a5fc74837675d8bafc7362 \
+    --hash=sha256:1f3689581a72eaba9131b1d9bdbfe520ccd169999219b41000ede2fca5c1bfdb \
+    --hash=sha256:223415140608d0f0da010499eaa8ccdb9af210a543fac54bce15babbcfc78439 \
+    --hash=sha256:22a086cff1b6ceca18a8dd6096ec631e430e93a8e70a9ca5efa7561a00f826fa \
+    --hash=sha256:25f8f3cd45087d089aef5ba3848cd9efe3ad41163d3400862fb42f81a3a46701 \
+    --hash=sha256:2b6bd67528ee8b5c5f10255735abc21aa106931f0dbaf297c7be0c886353c3d0 \
+    --hash=sha256:2e54296a283f3ab5a26fc9b8b5d4978ea0532f37b231644f367aa588930aa043 \
+    --hash=sha256:3756b3e9da9b83da1796f8809dd57cb024f838b9eeafde28f3cb472012797ac1 \
+    --hash=sha256:3a39c94ad7866160a4a46d772e43311a743c316942037671beb264e395bdd611 \
+    --hash=sha256:3b870ce5a02d4b22286cf4944c628e0f0881b11b3f14667c1d62185a99e04f53 \
+    --hash=sha256:3c83b0188c852a47cd13ef3bf9209fb0a77fa5374958b8c53aaa699398c6bd7b \
+    --hash=sha256:4203ce3b31aec23012d3a4cf4a2ed64d12fea5269c49aed5e4c3611b938e4088 \
+    --hash=sha256:457ed498fc58cdc12fc48f7950e02740d4f7ae9493dd4ab2168a47c93c31298e \
+    --hash=sha256:474d2596a2dbc241a556e965fb76002c1ce655445e4e3bf38e5477d413165ffa \
+    --hash=sha256:4b6d83057e713ff235a12e73916b6d356e3084fd3d14ced499d84240f3eecee0 \
+    --hash=sha256:4f187a0bb61b35119d1926aee039524d1f93aaf38a9916b8c4b78ac8514a0aaf \
+    --hash=sha256:51526324f1b23229001eb3735bc8c94f9c578b1bd9e867a0a646a3b17109f388 \
+    --hash=sha256:53e08b2445a6bc241261fea89d065536f00a581f02535f8122eba42db9375530 \
+    --hash=sha256:53f94448fe5b10ee75d246497168e5825135d54325458c4bfffbaafabcc0a577 \
+    --hash=sha256:5a56ba0db2d244117ed744dfa8f6f5b366e14148e00de44723413b2f3938a902 \
+    --hash=sha256:5f1ad7bf88535edcf30038f6919abe087f606f62c00a87d7e33e7fc57cb69fcc \
+    --hash=sha256:5f5e4c2a23ca271c218ac025bd7d635597048b366d6f31f420aaeb715239fc98 \
+    --hash=sha256:6a573a35693e03cf1d67799fd01b50ff578515a8aeadd4595d2a7fa9f3ec002a \
+    --hash=sha256:6c0e5a65158a7946e7a7affa6418878ef97ab66636f13353b8502d7ea03c8097 \
+    --hash=sha256:6dffecc361d079bb48d7caef5d673c88c8988d3d33fb74ab95b7ee6da42652ea \
+    --hash=sha256:7149623bba7fdf7e7f24312953bcf73cae103db8cae49f8154dd1eadc8a29ecb \
+    --hash=sha256:72d35d7aa0bba323965da807a462b0966c91608ef3a48ba761678cb20ce5d8b7 \
+    --hash=sha256:75ffc32a569fb049499e63ce68c743155477610532da1eb38e7f24bf7cd29e74 \
+    --hash=sha256:7713e1179d162cf5c7906da876ec2ccb9c3a9dcbdffef0cc7f70c3667a205f0b \
+    --hash=sha256:78228d8a6a1c177a96b94f7e2e8d012c55f9c760761980da16ae7546a15a8e9b \
+    --hash=sha256:809c5bcb2c67cd0ed81e9229d227d4ca28f82d0f778fc5fea624a9def3963f91 \
+    --hash=sha256:81dad8d145d8fd981b2962b686b2241d3a1ea07733e76a2f15435dfb7fb60150 \
+    --hash=sha256:89c4b48479a43f820b749df49cd7ba2dbc2b1b78560ecb5ab52985574fd40b27 \
+    --hash=sha256:8e735494da3db08694d26480f1493ad2cf86e99bdd53e8e9771b2752a5c0246a \
+    --hash=sha256:9174f4ed06f790a6869b41cba05b43eeb9a35f8993c4422ab853b705e8112bbd \
+    --hash=sha256:9300d02ea7c6506f00e627e287e0492a5eb0371ec1670ae852fefffa6164b072 \
+    --hash=sha256:9654dbc012d8b06fc3d19cc825af3f7bf8ae242226df5f83936cb39f5fdc846c \
+    --hash=sha256:98750a309eb2f020da61e727de7d7ba3c57c97cf6213f6f6277bb7fb42a8e065 \
+    --hash=sha256:99c0c846e6e61718715a3c9437ccc625de26593fea60189567f0118dc9db7512 \
+    --hash=sha256:a4089a10e598eae6393756b036e0f419e8c1d60f44a831520f9af41c14216cf2 \
+    --hash=sha256:a51ff14f8017338e2f2e5dab738ce1ec3b5a851f23b18c1ae1359b1eecbee6df \
+    --hash=sha256:a5a419712cf88862a45a23def0ae063686db3d324cec7edbe40509d1a79a0aab \
+    --hash=sha256:a9ec8c642d1ec73287ae3e726792dd86c96f5681eb8df274a757bf62b750eae7 \
+    --hash=sha256:aaf21ba8fb76d102b696781bddaa0954b782536446083ae3fdaa6f16b25a1c4b \
+    --hash=sha256:ab85470ab54c2cb96e176f40342d9ed41e58ca5733be6a893b730e7af9c40550 \
+    --hash=sha256:bfc4e20784722098822e3eee42b8e576b379ed72cca4a7cb856ae733e62192ea \
+    --hash=sha256:bfd06b1c5584b657a2892a6014c2f4c20e0db0208c159148fa78c65f7e0b0277 \
+    --hash=sha256:c2ba942c94e0691467ab901fc51b6f2085ff48f2eea77b1a48240f011e8247c7 \
+    --hash=sha256:c8e167d5adf59476fa3e37bee730890e389410c354771a62e3c076c86f9f7778 \
+    --hash=sha256:ca54090275939dc8ec5dea2d2afb400e0f83444b2fc24e07df7fdef677110859 \
+    --hash=sha256:d8c56bb4e6c795fc77d74d8e8b80846e1fb8292fc0b5060cd8131d522974b751 \
+    --hash=sha256:e05ab82ea7753354bb054b92e2f288afb750e6b439ff6ca78af52939ebbc476d \
+    --hash=sha256:e09bb6252b6476d8d56100e8147b803befa9a12cea144bbe629dd508800d1ad0 \
+    --hash=sha256:e7360eae90809efd19b886e59a09dad07da4ca9ba096752e61a2e03c8aca188e \
+    --hash=sha256:e96594a5537722fdfb79951672a2a63aec5ebfb823e7560586f7484819f2a08f \
+    --hash=sha256:f27662e4f7dbf9f9c12391cb37b4c4c3cb90ffbd3b1fb9284dadbbb8935fa708 \
+    --hash=sha256:f373da2c1757bb7f1acaf09369cdc1d51d84131e50d5fa9863982fd626466313 \
+    --hash=sha256:f604efd28f239cc21b3adb53eb061e2a205dc164be408e553b41ba2ffe0ca15c \
+    --hash=sha256:f67e8f1a324a900e75b5e28ffb152bcac9fbed1cc7b43f99cd90f395c4375344 \
+    --hash=sha256:fd7a5004eb1980d3cefe26b2685bcb0b17989901a70a1040d1ac86f1d898c551
diff --git a/.github/workflows/publish-repository.yml b/.github/workflows/publish-repository.yml
index 1f373d3..f90168e 100644
--- a/.github/workflows/publish-repository.yml
+++ b/.github/workflows/publish-repository.yml
@@ -275,8 +275,14 @@ jobs:
       # on ModuleNotFoundError under `continue-on-error: true`, i.e. silently,
       # which is the one thing the report must not do. `prepare` installs the
       # same pin for the same reason.
+      # Hash-pinned, not just version-pinned: this job holds id-token: write
+      # and signs with cosign, so a PyPI-side substitution under an unchanged
+      # version would run inside it. See the requirements file for how to
+      # regenerate the hashes.
       - name: Install zstandard
-        run: pip install --disable-pip-version-check --quiet 'zstandard==0.25.0'
+        run: |
+          pip install --disable-pip-version-check --quiet \
+            --require-hashes --no-deps -r .github/requirements/zstandard.txt
       - name: Verify and seed repository from the prepare-time factory image
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -392,6 +398,13 @@ jobs:
           # source reports stay: they describe the seeded RPMs, which are still
           # in the repository being published.
           rm -f repository/reports/buildroot-*.json
+          # Same shape, same reason: the multimedia closure report names the
+          # NEVRAs *this* publish resolved. Its step is continue-on-error, so
+          # a ClosureError leaves nothing behind to overwrite the seeded copy
+          # and the previous run's NEVRAs would ship in this image as if they
+          # described it -- the "committed stale" outcome that step exists to
+          # avoid. Drop it; only a report this run produced may be published.
+          rm -f repository/reports/multimedia-closure.json
       - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
         with:
           name: ${{ inputs.artifact_prefix }}preflight-buildroot
diff --git a/docs/skills/multimedia-closure.md b/docs/skills/multimedia-closure.md
index defeb93..87e2acc 100644
--- a/docs/skills/multimedia-closure.md
+++ b/docs/skills/multimedia-closure.md
@@ -156,6 +156,14 @@ contract is the measurement that will show it, not the work it measures.
   `--repodata` half runs only there, so no PR check can catch a failure in it.
   If you want the closure to block a publish, that is a deliberate widening:
   say so in the PR, and take the flag off on purpose rather than by accident.
+- **Not gating means the report can be absent; it must never be stale.**
+  Because the step can fail without stopping the publish, it can also leave
+  nothing behind to overwrite what the seed brought in — the seed copies the
+  previous image's whole `/repository` tree, `reports/` included. The publish
+  job therefore deletes `repository/reports/multimedia-closure.json` right
+  after seeding, beside the buildroot snapshot scrubbed for the same reason,
+  so only a report this run produced can ship. A missing report is a visible
+  gap; one naming the previous run's NEVRAs is a wrong answer.
 
 ## Adding to the inventory
 
diff --git a/tests/test_multimedia_closure.py b/tests/test_multimedia_closure.py
index 4dbf037..aa2ccde 100644
--- a/tests/test_multimedia_closure.py
+++ b/tests/test_multimedia_closure.py
@@ -367,6 +367,19 @@ class PublishedNevraTests(unittest.TestCase):
         self.assertIn("|| status=$?", run)
         self.assertIn('exit "$status"', run)
 
+    def test_the_seed_drops_the_previous_runs_closure_report(self) -> None:
+        # The report step is continue-on-error, so a ClosureError writes
+        # nothing -- and the seed carries the previous image's whole
+        # /repository tree, reports included. Without this scrub the previous
+        # run's NEVRAs ship in this image as if they described it. Same
+        # reasoning as the buildroot snapshot scrubbed beside it.
+        from tools.publish_gate import load_workflow, PUBLISH_WORKFLOW
+
+        publication = load_workflow(PUBLISH_WORKFLOW)
+        publish_steps = publication["jobs"]["publish"]["steps"]
+        seed = next(s for s in publish_steps if "seed repository" in s.get("name", ""))
+        self.assertIn("rm -f repository/reports/multimedia-closure.json", seed["run"])
+
     def test_an_uncompressed_primary_is_read(self) -> None:
         with tempfile.TemporaryDirectory() as directory:
             repodata = Path(directory)
-- 
2.47.3


🐝 Hive Agent: scanner | Instance: hosted-projectbluefin-knuckle-gjvq | SHA: 9129991

— hive: agent=scanner backend=copilot model=claude-opus-5 copilot=1.0.88

@hanthor

hanthor commented Sep 30, 2026

Copy link
Copy Markdown
Member

Closing as stale: this in-repo carry of #233 is CONFLICTING and its Canary purpose is spent. Work continues on the source PR #233 (still open, awaiting rebase + maintainer scope answer on #230). Reopen or re-carry if needed.

@hanthor hanthor closed this Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants