mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #143] [MERGED] ci(groom): enable the auto-builder on this repo's own groom caller (BE-6851) #152
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#152
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/143
Author: @mattmillerai
Created: 8/9/2026
Status: ✅ Merged
Merged: 8/12/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-6851-ci-groom-builder📝 Commits (4)
451c220ci(groom): enable the auto-builder on this repo's own groom caller (BE-6851)8bffc71ci(groom): correct the builder safety audit's false claims (BE-6851)52aa0d0Merge branch 'main' into matt/be-6851-ci-groom-builderf410e62ci: nudge — retrigger checks after CI apparently never queued for52aa0d0📊 Changes
1 file changed (+269 additions, -34 deletions)
View changed files
📝
.github/workflows/ci-groom.yml(+269 -34)📄 Description
ELI-5
Groom already scans this repo every day and writes up the cleanups it finds. Until now it could only tell us about them. This turns on the part that also does them: the best couple of findings each run come back as normal pull requests instead of issues. Nothing merges itself — a machine-written PR sits in review like anyone else's, and this repo's own CI holds no secrets on the checks that run a PR's code, so a bad patch can waste a review and nothing more.
What changed
One file,
.github/workflows/ci-groom.yml:builder: truein thewith:block. This knob is inconfig.py's_LOCKED_KEYS, so it is not settable fromvars.GROOM_CONFIG— turning the auto-builder on can only ever be a reviewed diff, which is what this PR is.max_prsreviewed fallback of1, plus aworkflow_dispatchmax_prschoice input (['1','2','3','5'], default'1') mirroring the reusable's documented caller pattern and the comfy-infra caller.bot_app_id: ${{ vars.APP_ID }}, thepermissions:grant, and both SHA pins (uses:+workflows_ref,0b6ebf5) are unchanged.What I verified against the pinned SHA (not
main)The pin is
groom.yml@0b6ebf5e460ca02499e362aa8d650ac4d6806a7c, so that commit — notorigin/main— is what actually runs. Checked there:builderandmax_prsboth exist inon.workflow_call.inputs, so neither is an unknown-input startup rejection.buildandbuild_prarecontents: readonly,build_selectiscontents/issues/pull-requests: read,fileisissues: write,gateaddsactions: read.build_prdoes all its writing with the App installation token, which is why it needs nopull-requests: writefrom the caller. (A reviewer's first instinct here is "the builder opens PRs, surely it needs write" — it does, just not from this token.)_LOCKED_KEYS = ("builder", "sink", "bot_app_id", "workflows_ref", "config"), sobuildergenuinely cannot be flipped by a variable edit.patch_policy.py's_ROOT_PREFIXESdenies.github/workflows/and.github/actions/.build_prand the patch artifact isgroom-build-<idx>.Locally:
python3 -m unittest discover -s .github/groom/tests→ 287 passed (1 skip);python3 .github/agents-md-integrity/check_agents_md.py --root .→ passed with the two pre-existing warnings (AGENTS.md 186 lines, no CODEOWNERS);actionlint .github/workflows/ci-groom.yml→ clean. No test workflow path-filters onci-groom.yml, so CI will run no unit job for this PR — that is the repo's path-filtered design, not a gap.The security question, asked properly
"A human reads the PR first" gates the merge, not CI execution — opening a PR runs this repo's checks against the PR's own checkout before anyone reads the diff. So: does any pre-review check here hold credentials? Swept every workflow's triggers; exactly nine are
pull_request-triggered:test-*.ymlsuites do execute the PR's checkout (unittest + shellcheck over.github/**) and every one ispermissions: contents: readwith zerosecrets:— the ordinary untrusted-PR-CI posture of any public repo.ci-cursor-review.yml(CURSOR_API_KEY, SLACK_BOT_TOKEN,pull-requests: write) andci-assign-reviewers.yml(App key) — never execute the PR's code; both pin the reusable by merged-main SHA and it loads its scripts from that pinned ref, so a PR can't rewrite the logic judging it.Stated honestly rather than favourably: cursor-review does check out the PR to read the diff, so machine-written text reaches an LLM in a credentialed job as data. That is the same prompt-injection surface any outside contributor's PR already carries here — unchanged in kind by this flag, only raised in volume. The header records the condition that would invalidate this analysis (a credentialed workflow starting to execute the tree) and says the caller reverts to
builder: falseif it ever holds.Repo-specific consequence worth knowing before the dry run:
patch_policy.pydenies.github/workflows/, and this repo's deliverable is.github/workflows/. So a finding in a workflow file cannot become a PR here — it bails to agroomissue. Builder PRs will come from the script directories and the docs. Bail issues are exempt frommax_findings(BE-6157), so nothing is discarded.Judgment calls (please sanity-check these three)
max_prs: 1is the reviewed fallback, not the live value.vars.GROOM_CONFIGis already set on this repo to{"interval_days":"1","cadence":"1","max_prs":"2","max_findings":0}, and it outranks everywith:input. So the effective ceiling on merge is 2, not the 1 this PR writes. I did not edit the variable: it was set deliberately on 2026-08-04, before this ticket, and overriding a human's staged config out-of-band is worse than flagging it. If you want a literal 1, it is one command and no PR:gh variable set GROOM_CONFIG --repo Comfy-Org/github-workflows --body '{"interval_days":"1","cadence":"1","max_prs":"1","max_findings":0}'.max_prsinput is inert today, for the same precedence reason (a reusable can't read its caller's dispatch inputs; beating the variable would mean forwarding it through the reusable'sconfigJSON input instead). Added anyway for parity with the other builder callers and so the knob exists the moment the variable stops pinning it. Same call the comfy-infra caller made.== ''instead of the ticket's|| '1'. GitHub casts a string to a number for||truthiness and'0'casts to0, which is falsy — so the||form silently turns a deliberate "build no PRs this run" dispatch into 1. The empty-test does a same-type string comparison on a dispatch (so'0'survives) and a null-vs-string comparison on the schedule event (both coerce to 0 → the reviewed fallback). Same reasoning the comfy-infra caller wrote down. Worst case if I have GitHub's coercion wrong, it behaves exactly like the||form, so it is not a downside bet.Deliberately not changed: no
max_findingsreviewed baseline was added (comfy-infra added one). ClearingGROOM_CONFIGwould degrade this caller to the reusable's default of 12 findings issues — which is this caller's pre-existing behaviour, so adding one would be a scope-widening change, not a fix. Separately spotted and left alone:docs/callers/groom.mdstill listspr_size_limit's default as 400; it became 600 in BE-6161. Pre-existing doc drift, unrelated to this diff.Not met by this PR
The ticket's acceptance has a post-merge half that cannot be done from a PR branch — a scheduled/dispatch caller does not run on a PR. After merge, run the dry run before the next 09:17 UTC tick, because the daily cron resolves
dry_runto false and would otherwise be the first unattended live builder run:Expected: a
groom-build-<idx>artifact per selected finding and zero PRs opened.Negative-claim falsification
Not applicable, and checked rather than assumed: this diff denies no capability. It adds no "not supported"/"unavailable"/
STOPstring, no throw or deny dead-end, and flips no test to assert one — it enables the PR sink. The only path it narrows is documentation of an existing deny (patch_policy.py's workflow-path bail), which is pre-existing reusable behaviour verified at the pinned SHA, not something this diff introduces.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.