mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #212] [MERGED] fix(public-repo-hygiene): allowlist six verified-public Comfy-Org repos (BE-8855) #220
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#220
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/212
Author: @mattmillerai
Created: 8/23/2026
Status: ✅ Merged
Merged: 8/23/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-8855-public-repo-hygiene-allowlist📝 Commits (2)
6c4251efix(public-repo-hygiene): allowlist six verified-public Comfy-Org repos (BE-8855)a5f6305fix(public-repo-hygiene): casefold the allowlist duplicate check, document the sort (BE-8855)📊 Changes
3 files changed (+161 additions, -12 deletions)
View changed files
📝
.github/public-repo-hygiene/README.md(+15 -2)📝
.github/public-repo-hygiene/check_public_repo_hygiene.py(+38 -10)📝
.github/public-repo-hygiene/tests/test_check_public_repo_hygiene.py(+108 -0)📄 Description
ELI-5
The hygiene checker only knows a handful of Comfy-Org repos are public, and it treats everything else as a possible leak. Six repos that really are public were missing from that list, so every mention of them was being reported as a leak. This adds the six, sorts the list alphabetically so the next person can actually scan it, and adds a test that keeps it sorted and duplicate-free.
What changed
PUBLIC_COMFY_ORG_REPOSin.github/public-repo-hygiene/check_public_repo_hygiene.py:workflow_templates,ComfyUI-Manager,comfy-skills,CustomNodeComfyMath,cookiecutter-comfy-extension,ComfyUI-test-framework. Each carries a one-line comment recording where the reference came from, per the README runbook.ComfyUI*entries were already out of order relative to each other.AllowlistSourceOrderTest, which parses the module's own AST and asserts both allowlist literals (repos and teams) are sorted and duplicate-free, and that the literal it read is the one the module actually exports..github/public-repo-hygiene/README.md.Purely additive to the allowlist. It loosens nothing that default-deny was protecting: the list contains public names only by design, which is the property that makes it safe to host in a public repo in the first place.
Why the AST, not a runtime assertion
A
frozensethas no order at run time, so the source text is the only place the ordering exists — and it is exactly the view a human reads to answer "is<name>already in here?" before appending a duplicate to the bottom. An exact textual duplicate is also invisible to every other assertion in the suite, because the set literal collapses{"a", "a"}to{"a"}before any test can see it. The AST is the one view that still has both copies.Both halves were falsified rather than assumed: inserting an out-of-order entry failed
test_repo_allowlist_is_sorted_and_duplicate_freeon the ordering assertion, and inserting an in-order exact duplicate failed it on the duplicate assertion. The tree was restored between each.Verification
Each of the six re-verified PUBLIC at implementation time (2026-08-23) rather than trusting the list I was handed, by two independent paths:
gh repo view --json visibilityapi.github.com/repos/Comfy-Org/<name>workflow_templatesComfyUI-Managercomfy-skillsCustomNodeComfyMathcookiecutter-comfy-extensionComfyUI-test-frameworkThe unauthenticated check is the one that matters for a default-deny control:
gh repo viewruns as an org member, so it will happily print metadata for a private repo. An anonymous404would mean the repo is not visible to the public. All six returned200.End-to-end against a real caller: a throwaway shallow clone of
Comfy-Org/comfy-cliat9f42171(untouched, read-only, deleted after).Result: 252 internal-only reference(s) found.— 58 repo-reference findings, 194 ticket-id findings.Result: 223 internal-only reference(s) found.— 29 repo-reference findings, 194 ticket-id findings.Exactly the −29 predicted, split 21 / 3 / 2 / 1 / 1 / 1 across the six, matching the counts this change was sized against. No other finding moved, and the exit code is still
1— this does not turn that repo's build green, and is not meant to.The remainder this does NOT fix (223 findings)
Same sweep pointed at the half that is out of scope here, so the number is on the record rather than left to be discovered after merge:
huggingface.co/Comfy-Org/<model>URL that the checker's matcher reads as a GitHub repo path. That is checker matching logic and is deliberately not touched here — allowlisting a Hugging Face namespace into a GitHub default-deny list would be the wrong fix.Caller pins
Left to
bump-public-repo-hygiene-callers.yml, and I checked that this is safe rather than assuming it. The change lands in.github/public-repo-hygiene/check_public_repo_hygiene.py, which is inside that fleet'spaths:filter and outside both of its exclusions (tests/**,README.md) — so the fleet fires on merge. The README/docs half of this PR is excluded from the filter, which is correct: it is not something a pinned caller executes.The fleet is live, not a no-op: its roster secret exists and was last set 2026-08-22, and the one caller I can see from outside is currently pinned at
4df9bf6— the exact current tip ofmain— on both of its two pin sites (uses:andworkflows_ref:). So a fleet that bumps zero callers is not the state here.Judgment calls
str.casefold, not the default. A case-sensitive sort would requireComfyUIto sort beforecomfy-cli, which reads as unsorted to a human and does not match how membership is tested (which is casefolded).PUBLIC_COMFY_ORG_TEAMSalready happened to be sorted, so extending the same assertion to it was free and stops the identical drift one line down.Unexercised artifacts
Provenance
python3 -m unittest discover -s .github/public-repo-hygiene/tests -p 'test_*.py': 118 tests, OK (1 skipped, pre-existing). Negative-control runs on a deliberately unsorted literal and a deliberately duplicated entry: each failed the intended assertion, tree restored after.check_public_repo_hygiene.py --root <throwaway comfy-cli clone>: 252 findings before, 223 after, exit 1 both times.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.