Repository navigation
refactor(flavors): resolve reproducibility-check image name through flavors.py - #671
Conversation
…lavors.py check-reproducible-build.sh restated the flavor roster as a case literal and built every flavor with IMAGE_NAME=utah, while build-ghcr takes the per-flavor image name from scripts/flavors.py. Resolve both through flavors.py, and pin the desktop contract's image-flavor and image-ref patterns to the flavors.py roster with a host-side test. Closes #670 Signed-off-by: architect <architect@hive.kubestellar.io>
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "architect" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will keep the |
Danathar
left a comment
There was a problem hiding this comment.
Approving at ec04023. check-reproducible-build.sh now takes the image name from scripts/flavors.py image and exits 2 for an unknown flavor. A read-only helper ran tests.test_flavor_contract and tests.test_reproducible_build (14 OK). CI is green. Not run: a real two-build comparison. Hive's hold is still on, and I've left it for a maintainer.
There was a problem hiding this comment.
Read against the tree at ec04023; this looks correct to me.
Justfile:358/Justfile:472—build-ghcralready resolvesimage_nameviapython3 scripts/flavors.py imageand passes it as--build-arg IMAGE_NAME, so the probe now matches the real build's argument contract.scripts/configure-branding.sh:35—IMAGE_NAMElands inimage-info.json'simage-ref, which confirms the stated mechanism (kernel flavors previously compared two builds carrying the main image's ref).tests/test_flavor_contract.pypinscontracts/bluefin-desktop.toml:61-62toflavors.py list/image; both new test files pass locally (14 passed, 12 subtests).
One observation, not a defect: flavors.py image (scripts/flavors.py:57-61) checks the static IMAGE map rather than the active roster from config/flavors.json, so a flavor moved to retired would still pass the new guard at check-reproducible-build.sh:55, while the error message lists only the active flavors. Same behaviour as build-ghcr, so consistent — just noting the "expected one of" text slightly overstates the check.
PR body matches the diff; no scope beyond the claimed cluster. Hold-gated per the author's note, so a maintainer still needs to sign off.
Confidence: 5/5 (safe)
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
check-reproducible-build.sh accepted any flavor in flavors.py's static IMAGE map, so a retired flavor would still be built. Check membership in `flavors.py list` first, and stop discarding flavors.py stderr so a missing python3 or malformed config/flavors.json is not reported as an unknown flavor. List the script among flavors.py image consumers in docs/skills/flavors.md. Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <scanner@hive.kubestellar.io>
hanthor
left a comment
There was a problem hiding this comment.
Request changes pending the promised reproducibility evidence. The earlier maintainer approval was for ec04023; the current head is d8cafd6 and the approval is dismissed. Please run the real two-build comparison on this head and attach the result, or revise the PR description to remove that claim and request a fresh review. The focused unit tests and CI are green, but they do not establish reproducibility.
|
Updated the description to match head d8cafd6, which takes the second option from hanthor's review. It no longer claims reproducibility was verified: the Verification section now says no real two-build run was done on this head and that this PR only fixes which flavor list and image name the check uses. Also corrected: the script first checks the flavor against |
Danathar
left a comment
There was a problem hiding this comment.
Approving at d8cafd6, replacing my earlier approval of ec04023 (dismissed by the new commit).
What changed in d8cafd6: check-reproducible-build.sh now checks the flavor against flavors.py list (the active roster) before looking up its image name, so a retired flavor is refused, and a broken flavor config reports "cannot read the flavor roster" instead of "unknown flavor". The roster and flavor go to Python as arguments, not pasted into code.
Checked at this head: python3 -m unittest tests.test_flavor_contract tests.test_reproducible_build gives 16 tests OK. The membership check accepts main and nvidia-gaming and rejects retired and a malformed name. CI is green.
The description no longer claims a two-build reproducibility run was done, which was the second option in hanthor's review. I haven't run the two-build comparison either.
hanthor
left a comment
There was a problem hiding this comment.
The exact current head d8cafd6 has a 5/5 Hive review with no findings and a current approval confirming the fixes; all checks are green. As maintainer, deliberately releasing the ACMM hold for this bounded local architecture refactor and approving.
Utah's local "is the build reproducible?" check (
just check-reproducible <flavor>) built every flavor under the main image's name. For nvidia, gaming and nvidia-gaming that meant it compared two builds of an image CI never publishes: the update reference baked into the image pointed at the main image. This PR makes the check look up the flavor list and image names in the same place the real build does. It also adds a fast test so the desktop contract cannot fall out of step with that list.Refactor
Files / cluster claimed:
scripts/check-reproducible-build.sh(flavor validation +IMAGE_NAMEbuild arg),tests/test_reproducible_build.py, newtests/test_flavor_contract.py. Flavor-roster single-source cluster (#670).scripts/check-reproducible-build.sh: the hard-coded flavor list is replaced. The script checks the flavor against the active list frompython3 scripts/flavors.py list(exit 2unknown flavor: …, also for a retired flavor), then resolves the image name withpython3 scripts/flavors.py image "$FLAVOR"and passes it as--build-arg IMAGE_NAME=…, asjust build-ghcrdoes (Justfile:358). Before this change it was hard-coded toIMAGE_NAME=utah. A broken or unreadable flavor config exits 2 withcannot read the flavor roster, notunknown flavor.tests/test_reproducible_build.py: new test that each flavor fromflavors.py listbuilds under itsflavors.py imagename. It fails 3/4 subtests against the old hard-codedutah.tests/test_flavor_contract.py(new): every active flavor and itsghcr.io/<vendor>/<image>ref must matchcontracts/bluefin-desktop.toml'simage-flavor/image-refpatterns. Droppinggamingfrom the contract regex makes it fail.docs/skills/flavors.md: lists the script among the callers that askflavors.py imagefor the name (does not overlap the section ci: add non-blocking testsuite reporting to post-testing-e2e (#161) #631 edits).Does not touch
config/flavors.json,scripts/flavors.py, ortests/test_flavors.py.Verification
python3 tests/run_suite.py→Ran 1006 tests … OK (skipped=19)python3 scripts/check-script-syntax.py→syntax gate: 116 script(s) checkedbash scripts/check-reproducible-build.sh desktop→unknown flavor: desktop (expected one of: ["main", "nvidia", "gaming", "nvidia-gaming"]), exit 2just check-reproducible <flavor>run has been done on this head. This PR only fixes which image name and flavor list the check uses; whether a flavor actually builds reproducibly is out of scope. The podman stub tests cover the argument contract.Closes #670
Filed by architect agent (ACMM L5 — hold-gated mode). Hold-gated: human review required.
— hive: agent=architect backend=copilot model=claude-opus-5.5 copilot=1.0.88