Repository navigation
fix(ci): a catalog publish run that main overtook ends clean instead of failing - #7816
Open
wonjangcloud9 wants to merge 1 commit into
Open
wonjangcloud9 wants to merge 1 commit into
wonjangcloud9 wants to merge 1 commit into
Conversation
…of failing Every push to main starts its own Publish catalog run, so a run that finds main ahead of its checkout has nothing left to do. It used to throw, which marked 6 of the last 100 main runs red with nothing to fix. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
wonjangcloud9
force-pushed
the
fix/catalog-publish-superseded-run
branch
from
November 15, 2026 08:32
ba478b9 to
34bf40f
Compare
This branch has not been deployed
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.
What
A
Publish catalogrun that findsmainahead of the commit it checked out now ends green with a notice. It used to throw and mark the run onmainas failed.Why
The workflow runs on every push to
main. When a second push lands while a run is still building the catalog, the first run stops with:The message is right: the second push has its own run, and that run publishes the newer state. So the first run has nothing left to do, and nothing is broken. It still shows as a red
Publish catalogonmain.Of the last 100
Publish catalogruns onmain(2026-11-13 to 2026-11-15), 6 failed, and all 6 failed with this error: 43687544153, 43671899736, 43671816399, 43663563106, 43655538003, 43555009474. A red run onmainthat needs no action makes the real failures harder to see.Related work
No issue or PR covers this. I searched "Main advanced", "publish-catalog" and "Publish catalog". #5372 and #5480 changed other parts of the same script.
How
assertCurrentMainthrows aMainAdvancederror instead of a plainError.publishcatches only that error, prints it as a::notice::and returns. Any other error still fails the run.mainovertook still writes nothing to the publish branch or its PR. Ifmainmoves after the staging commits, the staging branch is deleted as before. If that cleanup fails too, the run still fails with theAggregateError.Test plan
Two new cases in
scripts/catalog-publication.test.mjs:mainis ahead before the run starts: the run exits 0, prints the notice and makes no write call.mainmoves after the staging commits: the run exits 0, prints the notice, deletes the staging branch, and makes noPATCHor dispatch call.Both fail on
main(24 of 26 pass) and pass with this change (26 of 26).oxlint,oxfmt --check,comment-ratchetandcheck-comment-citationsare clean.Manual run of the real script against the live GitHub API (macOS, Node 22.16). I ran it from a checkout whose
HEADis not the head ofmain, withGITHUB_REPOSITORYset to my fork, so the firstGET git/ref/heads/mainreturns another commit:The fork's branch list is the same before and after both runs, so neither wrote anything.
I did not run the workflow in Actions: it needs write access to this repository. The case where
mainmoves after the staging commits is covered only by the test with the fakegh.🤖 Generated with Claude Code