mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #69] [MERGED] fix(groom): default workflows_ref to github.job_workflow_sha so assets can't desync from the uses: pin (BE-4169) #80
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#80
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/69
Author: @mattmillerai
Created: 7/24/2026
Status: ✅ Merged
Merged: 8/4/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-4169-groom-workflows-ref-default📝 Commits (3)
55385c6fix(groom): default workflows_ref to github.job_workflow_sha so assets can't desync from the uses: pin (BE-4169)e662e56Merge remote-tracking branch 'origin/main' into matt/be-4169-groom-workflows-ref-default31bc5a1Merge remote-tracking branch 'origin/main' into matt/be-4169-groom-workflows-ref-default📊 Changes
1 file changed (+41 additions, -13 deletions)
View changed files
📝
.github/workflows/groom.yml(+41 -13)📄 Description
ELI-5
The groom workflow reads its instruction files (the finder/verifier/builder briefs + the dedup ledger) out of this repo. Until now, callers had to hand-copy the same commit SHA into two places — the
uses:line and aworkflows_ref:input — to make the code and the instructions match. Nobody enforced that they stayed equal, so a caller that forgotworkflows_refran the pinned code but read instructions from movingmain, and a pin bump that touched only one line ran code and instructions at different commits. This change makes the workflow default to pulling its assets from the exact commit it was itself resolved from (github.job_workflow_sha), so callers don't have to mirror anything and the two can't drift.What changed
.github/workflows/groom.ymlonly:_groom_assetsstep from${{ inputs.workflows_ref }}to${{ inputs.workflows_ref || github.job_workflow_sha }}(all six asset checkouts: finder briefs, verifier briefs, both ledger checkouts, the builder brief, and the signature marker — leaving any one bare would reintroduce the desync).workflows_refinputdefaultfrommainto''(empty), so an unset input falls through togithub.job_workflow_sha— documented as "for jobs using a reusable workflow, the commit SHA for the reusable workflow file."workflows_refas an explicit override (e.g. testing briefs from a branch) and rewrote its description to say so.workflows_ref: <sha>line from the caller-pattern comment block and refreshed the adjacent security comment.Why this is safe
groom.ymlison: workflow_callonly, sogithub.job_workflow_shais always populated with the reusable workflow's own resolved commit when its jobs run. The||returns the first truthy operand: an explicitworkflows_refstill wins; an empty/unset one falls back to the auto-pin. The degenerate "both empty" case cannot occur for aworkflow_call-only reusable, and even if it did, an empty ref just checks out github-workflows' default branch — no worse than the olddefault: main.default: mainwas the naive initial default introduced with the workflow itself in #49 (BE-3872); this ticket is its intended correction (deferred from the review thread on comfy-cloud-mcp-server#786).Scope / follow-ups (deliberately not in this PR)
Both remaining caller cleanups must wait until each caller's
uses:pin is bumped to a SHA that includes this fix — droppingworkflows_reffrom a caller whoseuses:still points at the pre-fixgroom.ymlwould make that old workflow default tomain, i.e. the exact drift bug:ci-groom.ymlstill passesworkflows_ref: 07154fb…(itsuses:pins the old groom.yml). Left as-is; it becomes removable once the pin is bumped (bump-callers machinery).Verification
python3 -m unittest discover -s .github/groom/tests→ 48 tests pass.inputs.workflows_refrefs confirmed replaced.github.job_workflow_shais populated on a SHA-pinneduses:dispatch (a live dry-run ofci-groom.ymlagainst a SHA carrying this change). Not runnable from the coding loop (needs a live run + secrets).actionlint1.7.12 flagsgithub.job_workflow_shaas an unknown context property — that's a stale-schema false positive (the property is documented and quoted above); this repo's CI does not run actionlint on workflows.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
pathinput scopes an audit to one directory, without resetting the cadence clock (BE-4757) #95