mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #75] [MERGED] fix(bump-callers): refresh the already-converted main (<short>) pin marker (BE-4523) #84
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#84
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/75
Author: @mattmillerai
Created: 7/25/2026
Status: ✅ Merged
Merged: 7/26/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-4523-bump-callers-marker📝 Commits (2)
d38b4f2fix(bump-callers): refresh the already-convertedmain (<short>)pin marker (BE-4523)858c077fix(bump-callers): scope the SHA bump to our own reusable in a multi-reusable caller (BE-4523)📊 Changes
2 files changed (+171 additions, -9 deletions)
View changed files
📝
.github/bump-callers/bump-callers.sh(+76 -9)📝
.github/bump-callers/tests/test_bump_callers.sh(+95 -0)📄 Description
ELI-5
Each caller repo's workflow file pins our shared reusable workflow twice: once as the machine-readable 40-character commit SHA, and once as a human-readable comment that says which commit that is —
# github-workflows main (dc65b8b). The auto-bumper knew how to update the SHA, and knew how to convert the old comment style (# github-workflows#27) into the new one — but it never learned to update the new one again. So the moment a caller had been converted, its comment froze forever while the real pin kept moving, and the comment started lying about which commit the file uses. This teaches the bumper to keep that comment in step with the pin.What changed
.github/bump-callers/bump-callers.shgains a third rewrite rule alongside the existing two, plus a guard:github-workflows main (<hex>)→github-workflows main (${SHORT}),{7,40}so both the short and full-SHA spellings are covered.#. Callers carry the same annotation in two spellings: the trailing comment on theuses:line, and a prose comment above it (# Pinned to github-workflows main (dc65b8b). The bump-… workflow …). The ticket's proposed pattern was anchored to# github-workflows main (…), which matches only the trailing form; dropping the anchor catches both, which is what the hand-fix on the symptom PR actually had to do.uses:is the one this fleet is bumping; otherwise it leaves every marker as found and emits a::warning::. That is deliberately more conservative than the ticket's "rewrite the one adjacent to$WORKFLOW_FILE" — see the judgment call below.main (<hex>)marker, so agents-md-style# v1callers and marker-less callers see no new warning and no behavior change at all.The legacy
# github-workflows#[0-9]+rule and the 40-hex substitution are untouched (their existing test coverage still passes unchanged)..github/bump-callers/tests/test_bump_callers.shgains the two cases the ticket asked for. Suite is 100 passed / 0 failed;shellcheck -xclean on both files. Verified the tests are load-bearing: reverting onlybump-callers.shturns them red (96 passed / 4 failed), and all four failures are the new assertions.Evidence it fixes the reported symptom
Ran the exact rewrite pipeline over
Comfy-Org/Comfy-iOS's real.github/workflows/ci-cursor-review.ymlatorigin/mainwithNEW_SHA=377f7e18605615508898095cfa9ac65173aae2f9. Output is byte-for-byte the diff that PR had to be hand-fixed into — all four lines move together (prose marker,uses:SHA,uses:trailing marker,workflows_ref), where the bumper previously produced only the last three.Falsification of the guard's premise
The guard is only safe if no real caller pins more than one github-workflows reusable from one file — otherwise it would silently suppress marker updates fleet-wide, i.e. quietly restore today's bug. I did not assume this; I checked it. Fetching all four caller variables and resolving every caller file live: 22 of 23 caller entries resolve to exactly one github-workflows reusable, matching their own fleet's
WORKFLOW_FILE— so the guard passes for every live caller and never blocks a bump. 18 of those files carry at least onemain (<short>)marker that is stale today (two carry the Comfy-iOS-style prose + trailing pair). One caller file was unreadable with this token (permissions), so it is unverified rather than confirmed; worst case there is the conservative branch — markers left alone plus a warning, never a wrong rewrite. Caller repo names are deliberately omitted here: this repo is public and the caller list is masked out of its run logs.Judgment calls
uses:-proximity matching. The ticket suggested scoping the marker rewrite to the marker on/adjacent to theuses:line for$WORKFLOW_FILE. I did not do that, for two reasons. First, it does not actually work for the reported symptom: the stale prose marker in Comfy-iOS sits four lines above theuses:line it annotates, so any proximity rule tight enough to be safe is too tight to fix the bug that was filed. Second, proximity would produce a worse multi-reusable outcome than refusal — the pre-existing 40-hex rule would still bump the sibling's SHA while proximity kept its marker at the old value, which is the exact "marker disagrees with the pin" defect this ticket exists to kill, just relocated. Refusing to rewrite anything in an ambiguous file and saying so in the log is the honest failure mode./github-workflows|workflows_ref/ s/[0-9a-f]{40}/…/grule already clobbers a sibling reusable's pin to this fleet's SHA. That is a separate, older bug; no caller triggers it today (see falsification above) and narrowing that rule would change long-standing bump behavior, so I left it and am flagging it here rather than folding it in.Unmet criteria
None. Both requested test cases are present, the legacy rule is preserved, and the scope concern is addressed (differently, and explained above).
Test plan
bash .github/bump-callers/tests/test_bump_callers.sh→ 100 passed, 0 failedshellcheck -x .github/bump-callers/bump-callers.sh .github/bump-callers/tests/test_bump_callers.sh→ clean.github/workflows/test-bump-callers.ymlon this PR (its path filter covers.github/bump-callers/**).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.