Repository navigation
publish-verify: skip a superseded commit with a notice instead of going red - #1277
Merged
Merged
Conversation
bpalermo
marked this pull request as ready for review
October 5, 2026 20:00
This was referenced Oct 5, 2026
…ng red publish-verify's workflow_run path verified every finished publish run's commit, so each merge that replaced a pending publish (the run ends cancelled, pushes nothing) turned main red with "not published: ...": eight red runs on 2026-10-05 alone, which hide a real verification failure. A new step, before the gate, asks scripts/publish-verify-superseded.sh: if the publish run did not conclude success AND the commit is no longer main's head (git ls-remote), the commit is superseded; the registry check and the cosign pass are skipped and the run says so in a ::notice:: and the job summary. Everything else is verified exactly as before: a publish that reported success with missing artifacts or signatures is still red, and so is main's own head whatever its publish concluded (nothing newer will publish it). An unknown head or malformed sha fails closed (verify). Checkout ref and permissions are unchanged. Also a targeted SC2016 directive on the issue step's printf (literal Markdown fences), the one actionlint finding in this file. //scripts:publish_verify_superseded_test pins the decision (13 cases) and the step's GITHUB_OUTPUT / notice. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
force-pushed
the
upgrade/publish-verify-superseded
branch
from
October 5, 2026 22:43
d0fe7df to
777959e
Compare
bpalermo
added a commit
that referenced
this pull request
Oct 6, 2026
) The workflow_run path skips a commit whose publish did not succeed once main has moved past it (#1277); the --recent sweep still demanded commit-addressed artifacts for every push head, so the 2026-10-05 sweep (run 37384419419) went red on the eight consecutive publishes that the next merge cancelled while pending (b1dc1c0..28b2680: 176 of 736 artifacts "missing"). The sweep now applies the same function to each push head (select_unsuperseded in scripts/push-heads-lib.sh calls publish-verify-superseded.sh decide): a superseded head is printed as `skip <sha> (superseded push head ...)` with a ::notice:: and a job-summary line; main's head, a head whose publish succeeded (any green re-run wins) and a head with no publish run on record are still checked. An unreadable run list or an unknown main head skips nothing. The quiet-day fallback picks the newest push head that was not superseded. Test: //scripts:push_heads_superseded_test, canned 2026-10-05 runs. Closes #1282 Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr Co-authored-by: Claude Fable 5.1 <[email protected]>
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.
Standalone, off
main. This is in its own PR on purpose:publish-verify.yamlis a release-verification workflow.Problem (confirmed)
publish-verifyruns onworkflow_runofpublishand checks the registry for that run's commit. When a merge replaces a pending publish, that run endscancelledand pushes nothing. Its commit is then reported "not published", andmaingoes red even though the next publish carries the change.On 2026-10-05 this happened eight times in a row, from run 37327978991 through 37362581014. Each was the
workflow_runof a publish that had been cancelled because a newer merge superseded it. Then 37363695109, fordf3a1136(the publish that succeeded), went green. Red noise like this hides a real failure.Change
A new step runs before the gate:
scripts/publish-verify-superseded.sh.It treats a commit as superseded only when both of these hold:
success, andmain's head (git ls-remote origin refs/heads/main).For a superseded commit, the registry check, Bazel setup and cosign pass are skipped. The run says so in a
::notice::and in the job summary, and finishes green.Everything else is checked exactly as before:
mainheadsuccessmainmoved onThe task asked for neutral whenever the conclusion is
cancelled. I made one deliberate exception: a cancelled run for the commit that is stillmain's head stays red. In that state no later publish will build that commit, so it really is missing. That case is a manual cancel, or a cancel by the stuck-run watchdog (#1276 never cancels a head run).Note (#880): this reverses part of #880's intent. A superseded commit has no commit-suffixed chart tag of its own, so it cannot be deployed by that exact tag. The runbook's remedy still works: re-run its publish run. This PR stops counting that as a failure.
Also included: a targeted
# shellcheck disable=SC2016on the issue step'sprintf. The backticks there are literal Markdown fences. This was the only actionlint finding in this file. The stacked actionlint PR ignores it for this one file through.github/actionlint.yaml; drop that entry once this merges.How the neutral path was verified without a real cancelled publish
The decision is pure: commit, conclusion,
mainhead →superseded|verify. That made it unit-testable.//scripts:publish_verify_superseded_test(hermetic, part ofbazel test //...) covers:cancelled,mainmoved on → skip). Every "must stay red" case is pinned: success, head, unknown or malformed head, abbreviated or uppercase sha, empty conclusion.MAIN_HEADstanding in forls-remote:skip=true, the notice, and a summary line;skip=falseand no notice.The test caught one bug while I was writing it: an empty conclusion was being classed as superseded.
The workflow wiring was checked by reading it:
steps.superseded.outputs.skip != 'true'to their existingif:;steps.verify/steps.controlfailing, so a skipped gate files nothing;Not changed / found (not fixed here)
--recentsweep is not taught about superseded heads. Superseded commits are still push heads, so a sweep that completes will report themMISSING. Today that does not show, because the sweep is not completing at all — see the next item. Teaching it means changing the push-head selection inscripts/push-heads-lib.sh/verify-published-artifacts.sh; that is a follow-up for you to decide on.timeout-minutesthree times in a row: 37243212359, 37269704858, 37328769954. Each endedcancelledin the cosign step. A timeout concludescancelled, which the issue steps (failure()) ignore, so the backstop has been silently off since 2026-10-04. Not touched here, to keep this diff minimal.Proof
bazel test //scripts:publish_verify_superseded_test: pass.bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //scripts:all: clean.make format-check: clean.actionlint1.7.12: no findings in this file.//website:site_test: pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr