mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #82] [MERGED] ci(bump-callers): harden the main-tip lookup in the 5 sibling entrypoints (BE-4683) #91
Labels
No labels
cursor-review-catalog-drift
groom
groom
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/github-workflows#91
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/github-workflows/pull/82
Author: @mattmillerai
Created: 7/27/2026
Status: ✅ Merged
Merged: 7/28/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-4683-harden-main-tip-lookup📝 Commits (1)
feda217ci(bump-callers): harden the main-tip lookup in the 5 sibling entrypoints (BE-4683)📊 Changes
5 files changed (+70 additions, -5 deletions)
View changed files
📝
.github/workflows/bump-agents-md-callers.yml(+14 -1)📝
.github/workflows/bump-assign-reviewers-callers.yml(+14 -1)📝
.github/workflows/bump-cursor-review-callers.yml(+14 -1)📝
.github/workflows/bump-groom-callers.yml(+14 -1)📝
.github/workflows/bump-pr-size-callers.yml(+14 -1)📄 Description
ELI-5
Five of our "bump the pinned SHA in every caller repo" workflows looked up the current tip of
mainlike this:main_tip=$(git ls-remote origin refs/heads/main | cut -f1). A shell pipeline reports the exit status of its last command, sobash -eonly ever sawcutsucceed — a failedls-remote(network blip, remote hiccup, rate limit) quietly leftmain_tipempty. Empty then compared unequal togithub.sha, so the guard printed "stale run/re-run; nothing to bump" andexit 0. The workflow reported success while bumping nothing, and a green run that bumped nothing looks exactly like a green run that bumped everything unless a human reads the log. That is precisely the silent-drift failure this machinery exists to prevent (AGENTS.md records a pin that never moved causing a realci-groom.ymlstartup failure).This runs
ls-remoteon its own so its exit status is actually checked, rejects empty output, and only then compares againstgithub.sha. A lookup we couldn't perform is not evidence of staleness — so it now fails loudly instead of pretending the run was stale.What changed
The fix already landed in
bump-auto-label-callers.yml(commit7b360ed, branchci/auto-label-bump-fleet/ #81) is ported verbatim to the five sibling entrypoints that #81 left untouched:.github/workflows/bump-cursor-review-callers.yml.github/workflows/bump-groom-callers.yml.github/workflows/bump-assign-reviewers-callers.yml.github/workflows/bump-pr-size-callers.yml.github/workflows/bump-agents-md-callers.ymlEach file's surrounding explanatory comment is preserved and the stale-run branch itself is byte-for-byte unchanged — the only behavior change is that a failed or empty lookup now exits 1 with a
::error::annotation instead of falling through to the stale-runexit 0.Verification
bash .github/bump-callers/tests/test_bump_callers.sh→ 123 passed, 0 failed.shellcheck -x .github/bump-callers/bump-callers.sh .github/bump-callers/tests/test_bump_callers.sh→ clean.run:blocks, so additionally: all five files parse as YAML, and each editedrun:block passesbash -nandshellcheck -s bashafter extraction.daf635a…); a bogus remote exits 1 with::error::Could not look up the current main tip; a non-existent ref (empty output) exits 1 with::error::git ls-remote returned no SHA. Confirmed under bothset -euo pipefailand plainset -e(GitHub's defaultrunshell), sinceif ! var=$(cmd)suspends-ein the condition and must not swallow the failure.Risk / falsification
The change converts a silent skip into a hard failure, so the one real risk is
git ls-remote originnot working in the runner at all — it runs afteractions/checkoutwithpersist-credentials: false. Falsified empirically against the real runner, not assumed: the log of run 30222872404 (bump-groom-callers, 2026-07-26,success) shows thels-remoteline executing, no stale-tip message, and the job reachinggroom bump complete for all callers. The repo is public, so anonymous HTTPSls-remotesucceeds; reproduced locally againsthttps://github.com/Comfy-Org/github-workflows.git.Judgment calls / notes
main_tip=${ls_remote%%$'\t'*}:$'\t'is a bash-ism, and under a non-bash shell it would strip nothing and reintroduce the exact silent no-op. That is safe here because the surrounding guard already uses[[ ]], so these blocks are bash-only by construction — and it is verified by the extraction checks above rather than by inspection.grep -rn ls-remoteover the repo returns only these five files, and there are no other unguardedx=$(… | cut)assignments under.github/workflows/.bump-auto-label-callers.ymlis not onmainyet — it lands with #81 already carrying this fix.main, not stacked on #81 — these five files are pre-existing and #81 does not touch them, so there is no dependency in either direction.run:blocks, which the repo has no harness for; the extraction + branch-exercise checks above are the substitute. Adding such a harness would be a bigger, separate change than this mechanical port.Closes BE-4683.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.