Repository navigation
fix(publish-verify): demonstrate the gate's red state in CI on every run (#930) - #983
Merged
Merged
Conversation
…run (#930) The artifact gate's only demonstrated red was a real defect (1e31e3a, #929) that aged out of the sweep window with nothing fixed, leaving a gate whose failure path was asserted rather than shown (#853). - scripts/publish-verify-control.sh: the expected-red control. Builds a commit with `git commit-tree` on origin/main's tree (fixed identity and dates, so deterministic per base; never pushed, no ref), runs the verifier on it and asserts it goes red for the right reason: exit exactly 1, 20 MISSING lines all naming that sha, no `ok` line, 12 non-empty tag scans, and the `FAIL: 20 of 20` summary. Verifier exit 2 is inconclusive (2). A constructed commit never ages out; a pinned one (ef44437, 1e31e3a) does. - publish-verify.yaml: the control runs before the gate on every trigger, in its own step; the gate runs regardless of the control's outcome; a failed control files its own rolling issue, separate from "artifacts missing". - scripts/check-publish-verify-control.sh (ci.yaml `shell` job, no network): drives the REAL verifier against a fake registry (#930 option 1) and shows the control rejects a verifier that stopped counting MISSING, empty tag listings, a MISSING line for another commit, a stray `ok`, and a perfect red with exit 0; accepts a correct red; reports exit 2 as inconclusive. - docs/runbook.md: publish-verify paragraph. Closes #930 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…deQL actions/untrusted-checkout); runbook merged with #982's cosign section Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
force-pushed
the
fix/publish-verify-red-state
branch
from
September 27, 2026 12:01
dd03294 to
42d5640
Compare
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.
Why
The artifact gate's only demonstrated red state was a real defect:
1e31e3apublished unsigned (#929). That red aged out of the--recentwindow three runs later, and nothing had been fixed. Since then the gate's failure path has been asserted, not shown (#853). #978 proved the red once, locally. This PR makes every publish-verify run prove it again.What
Expected-red control, on every
publish-verifyrun (scripts/publish-verify-control.sh). It runs as its own step before the gate:Control commit: built at run time with
git commit-tree. It usesorigin/main's tree, hasorigin/mainas its parent, and carries a fixed identity and fixed dates, so the same base always gives the same sha. No ref points at it and it is never pushed, so no publish can ever have produced it, and it cannot age out. A pinned sha (ef44437,1e31e3a) or "the newest non-push-head in the activity log" both age out: the second finds nothing on any month without a stack merge. The commit's tree is main's real tree, so the verifier asks the registry for real, correctly shaped coordinates (real Chart.yaml versions). Only the sha is one that was never published.Checks that the red has the right cause. All of these must hold:
MISSINGlines (4 charts + 8 images + 8 signatures, derived fromghcr-lib.sh), and every one names the control sha;okline;FAIL: 20 of 20 artifact(s) missing across 1 commit(s).If the verifier exits 2, the control reports inconclusive (exit 2).
Workflow: two clearly named steps, Expected-red control and Gate. The control writes neither
verify.lognor the job summary, so its MISSING lines can never file the "artifacts missing" issue. The gate runs whatever the control concluded. A failed control files its own rolling issue, "publish-verify: the expected-red control did not go red".Offline check in
ci'sshelljob (scripts/check-publish-verify-control.sh, no network). This is #930's option 1. It drives the real, unmodified verifier against a fake registry:ghcr-lib.shwith its three network functions overridden, copied next to the verifier in a temp dir. 10 cases:FAIL: 20 of 20);absent()no longer counts, so it prints MISSING but exits 0;okline;Mutation-tested: when I dropped the control's "exit 0 ⇒ fail" branch, only the exit-0 stub case went red (1 FAIL, exit 1). Every other assertion is backed by at least one case.
docs/runbook.md: the publish-verify section gains a paragraph on the control.Validation (local)
04aa13cba3627ff8283f57ccf308e378a71e1e47, built from1ad4b6a. The verifier inside it exited 1:FAIL: 20 of 20 artifact(s) missing across 1 commit(s), 20/20 MISSING naming the control sha, tag scans 220–914 each.--recenton today's main: exit 0,13 push head(s) … (4 non-head commit(s) skipped),PASS: 260 artifact(s) present across 13 commit(s).scripts/check-publish-verify-control.sh: 10/10.bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //scripts/...is clean.make format-checkis clean.check-shell-lint.shcovers all 28 scripts. Both workflows parse as YAML.Finding, not fixed here
My first
--recentrun went red:FAIL: 1 of 260, the cni-install signature ford526bf2(sha256-217b6449…). The same tag was present minutes later, and a rerun passed. During the first run apublish(9891ae0, 11:24Z) was pushing, and cni-install's tag count moved 898 → 902. That points atghcr_all_tagspagination dropping a tag under concurrent writes, which would make the gate cry wolf. It needs its own issue.Not run
git commit-treeon the runner (no git identity configured; the script passes identity via env) andGHCR_TOKEN: github.tokenfor the control's registry reads were not exercised there.Closes #930
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr