Repository navigation
fix(publish-verify): sweep only push heads; stack-merge intermediates never publish (#975) - #978
Merged
Merged
Conversation
… never publish (#975) publish runs once per push to main, for the push's head. gh-stack #963 landed #959/#962/#964/#965/#966 as five squash commits in ONE push headed by 4930733: publish ran for 4930733 and published it fully, and d74d77a, 690dbb5, 937a8fd and ef44437 were never the tree of any publish run. The --recent sweep checked every commit on main and filed #975 for all four. The sweep now checks the push heads in its window and prints every other commit as `skip <sha> (not a push head ...)`. Heads come from GitHub's activity log for refs/heads/main (scripts/push-heads-lib.sh), not from the list of publish runs: the log records the push itself, so a push whose publish run was cancelled (#880) or never created is still a head and still goes red. The quiet-window fallback now picks the newest push head older than the grace period, and an empty/unreadable/abbreviated head list is inconclusive (exit 2), never "nothing to check". Explicit commits (make check-published COMMIT=..., workflow_run) are unchanged. scripts/check-push-head-selection.sh pins the selection in CI (no network), including the fail-closed inputs. Closes #975 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
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.
Cause
publishruns once per push tomain, for the push's head commit. gh-stack #963 merged #959, #962, #964, #965 and #966 atomically: five squash commits in one push whose head was4930733.publishran for4930733and published it completely.d74d77a,690dbb5,937a8fdandef44437were never the tree of any publish run, so they have no artifacts by construction, and nobody can pin a deploy to them. The--recentsweep inscripts/verify-published-artifacts.shchecked every commit on main, so it filed #975 about all four.Fix
The sweep now checks only the push heads in its window. Every other commit is printed by name as
skip <sha> (not a push head: publish never ran for it — <subject>), so the narrowing always shows up in the log.refs/heads/main(GET /repos/{repo}/activity), inscripts/push-heads-lib.sh. I chose it overgh run list --workflow publish.yamlon purpose. The run list would narrow the gate to "commits a publish run exists for", and "a run that never existed" is one of the three failures publish: a commit merged to main can silently publish nothing (queued run superseded) #880 built this verifier to catch. The activity log records the push itself. A superseded publish (publish: a commit merged to main can silently publish nothing (queued run superseded) #880'scancelledcase) or a missing run still leaves a push head, and the sweep still goes red for it.workflow_runpath, which verifies a publish run's own head sha (a push head by definition), and explicit commits (make check-published COMMIT=…,workflow_dispatch). An explicit stack intermediate still reports MISSING, which is the true answer.select_push_headsis pure (candidates on stdin, head-list file).scripts/check-push-head-selection.shpins it and runs in theciworkflow next to the signature-layout check, with no network access.Proof the gate still goes red
--recent: exit 0. The output reads16 push head(s) … (4 non-head commit(s) skipped), the four skips are exactly the publish: artifacts missing for a commit on main #975 intermediates, and it endsPASS: 320 artifact(s) present across 16 commit(s).PUSH_HEADS_FILE= the real heads plusef44437, which was never published): exit 1, 20MISSINGlines foref44437,FAIL: 20 of 340 artifact(s) missing across 17 commit(s). A push head with missing artifacts still fails.PUSH_HEADS_FILE: exit 2,push-head list is empty; refusing to skip every commit.select_push_heads(every candidate becomescheck):check-push-head-selection.shreports 3 FAILs and exits 1.bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //scripts/...is clean, andaqueryconfirms both new files are inputs to the shellcheck action.make format-checkandcheck-shell-lint.share clean, and the edited workflows parse as YAML.Not run
GH_TOKEN: github.tokenreading/activityfrom a runner; I only called the endpoint with my localghauth. GitHub documents it as needing only metadata read, which everyGITHUB_TOKENhas.Closes #975
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr