mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #269] [MERGED] fix(public-repo-hygiene): anchor TICKET_RE on explicit boundaries and rebuild the ticket allowlist #272
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#272
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/269
Author: @mattmillerai
Created: 9/8/2026
Status: ✅ Merged
Merged: 9/8/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-8701-ticket-re-underscore-boundaries📝 Commits (2)
53d367ffix(public-repo-hygiene): anchor TICKET_RE on explicit boundaries and drop the unmatchable allowlist entries16b30f6fix(public-repo-hygiene): bound the ticket body to ASCII digits and drop the prefix-cleared allowlist entries (BE-8701)📊 Changes
6 files changed (+195 additions, -38 deletions)
View changed files
📝
.github/public-repo-hygiene/README.md(+3 -2)📝
.github/public-repo-hygiene/check_public_repo_hygiene.py(+55 -22)📝
.github/public-repo-hygiene/tests/test_check_public_repo_hygiene.py(+131 -9)📝
.github/workflows/public-repo-hygiene.yml(+4 -3)📝
README.md(+1 -1)📝
docs/callers/public-repo-hygiene.md(+1 -1)📄 Description
\brefuses to fire next to_, because_is a word character. That madecategory 1 of the public-repo hygiene checker miss the most ordinary spellings
a ticket id is actually written in —
BE-1234_design,feature/BE-1234_fix,_BE-1234_,FOO_BE-1234— on both the contents surface and the tracked-pathsurface. This replaces
\bwith explicit lookarounds and rebuilds thecategory-1 allowlist around what the shape can actually match.
What changed
TICKET_RE—\b[A-Z]{2,6}-\d{2,6}\b→(?<![A-Za-z0-9])[A-Z]{2,6}-\d{2,6}(?![A-Za-z0-9]).Three properties of the excluded class are load-bearing and each is commented
in place, because each is a way a later "tidy-up" silently undoes this:
_is deliberately absent. Putting it back ([A-Za-z0-9_]) makes theassertion fail next to an underscore again, which is semantically identical
to
\b— it would fix nothing while looking like a fix.-is deliberately absent too. Adding it would stopAES-128matchinginside
AES-128-CBC, and would break the wholeTICKET_ALLOWED_PREFIXEScarve-out, which depends on
CVE-2021-44228presenting here asCVE-2021.\btreatsa Cyrillic homoglyph as a word character, so gluing one to the front of an id
was a way past the check.
The new pattern is a strict superset of the old:
\bfires only when theneighbour is outside
\w=[A-Za-z0-9_](plus Unicode word chars), and everysuch character is also outside
[A-Za-z0-9]. So nothing that matched beforestops matching.
TICKET_ALLOWLIST— removedUTF-8,OAUTH-2,IPV-4,IPV-6,X-25519. The shape needs 2–6 letters and 2–6 digits, so none of the fivecould ever fire; they read as coverage while being unreachable. Added the two
matchable near-neighbours that have no public namespace behind them:
AES-192,SHA-224.Docs — the module docstring now states that CVE ids clear by pattern, not
by list; the stale
UTF-8allowlist example is corrected in the checker README,the reusable workflow's
ticket_allowlistinput comment, and the caller doc.Judgment calls
The CVE carve-out was already implemented, and better than what was
specified. The plan called for a new
CVE_PREFIX_REskip inside thecategory-1 loop.
TICKET_ALLOWED_PREFIXES(CVE,CWE,PEP,RFC,ISO,UTF) landed onmainafter that plan was written and already clears CVE idsby prefix, with no year to rot. Adding a second, narrower mechanism for the same
tokens would be a second place to forget. Kept the prefix mechanism; added the
behavioural coverage the plan asked for instead
(
test_a_cve_never_expires_and_never_shadows_a_real_id).UTF-16,UTF-32,RFC-1123,ISO-8859,ISO-27001were NOT added asexact entries, for the same reason — their namespaces (
UTF,RFC,ISO)already clear them. Re-listing them would be redundancy that drifts. Verified
directly rather than assumed:
test_matchable_near_neighbours_are_clearedasserts all seven tokens are cleanend-to-end and deliberately does not assert which route cleared them, so the
test survives either implementation.
Two tests corrected rather than extended. The plan said to extend
test_shape_boundarieswith the underscore shapes; that test pins an exactexpected list (
['BE-12', 'ABCDEF-123456']) which the plan also required beleft alone, so the new shapes went into three sibling tests instead —
underscore-matches, hyphen-still-a-boundary, glued-alphanumeric-still-not.
Separately,
test_allowlisted_acronyms_in_a_path_are_cleanusedsrc/UTF-8/toprove the built-in allowlist reaches the path surface — but
UTF-8isshape-proof, so it was passing via the regex, not via the allowlist it stood
for. Switched to
SHA-256.The workflow YAML was touched, against the plan's "no change to the workflow
YAML". The change is one header comment naming
UTF-8as a built-inallowlist entry, which this PR removes. No input, step, permission or default
moved, and
bump-public-repo-hygiene-callers.ymlalready triggers on thechecker path this PR edits, so no new bump is provoked. Leaving a documented
example that is provably no longer in the list seemed the worse outcome.
Corpus sweep — including the half this does not fix
Old regex vs new, over tracked paths and contents, netting out the exact and
prefix allowlists:
(token, file)pairsComfy-Org/github-workflows(this repo, 1,363 findings at baseline)Comfy-Org/ComfyUIComfy-Org/ComfyUI_frontendSo on three real public trees the loosened boundary introduces zero new
findings — it adds no false-positive load — and the shapes it newly catches
(
BE-1234_designand friends) are absent from all three, which is why they werenever noticed. They are pinned by unit test instead. The 4-finding delta in this
repo's own self-scan (1,359 → 1,363) is entirely the new fixture strings this PR
adds to its own test file and code comments.
Verification of the negative claims
Every claim of the form "this entry can never match" was checked empirically
rather than reasoned about:
test_every_allowlist_entry_can_actually_matchpins this as an invariant, sothe dead-entry trap cannot reopen when someone adds the next acronym.
Residual
Not fixed here, and worth knowing before this workflow acquires callers:
1,363 after, exit 1. That is pre-existing and expected:
github-workflowsisnot enrolled in its own
public-repo-hygieneworkflow (there is noci-public-repo-hygiene.yml), and its own conventions put ticket ids incommit messages, comments and test fixtures throughout. The plan listed
"self-scan stays green" as an acceptance criterion; that criterion is not
met and was never true on
main. Deciding whether to enrol this repo (andwith what
exclude_paths/ticket_allowlist) is a separate call, notsomething this PR should make.
repo enrols, and no caller exists yet, so the change is verified against this
repo's unit suite plus the three-repo sweep above — never against a live
consumer run of the reusable workflow.
ISO-8601,RFC-2119,RFC-7231,RFC-3339entries wereleft in place. Each is now cleared twice — once exactly, once by its
namespace prefix. They are harmless and the anti-vacuity test passes on them,
but they are the same "second place to maintain" shape this PR argues against
for
UTF-16. Deliberately out of scope.--scan-textPR-title/body surface is unaffected, verified:CAT_TICKETis not inSURFACE_CATEGORIES, so category 1 does not run thereat all and the boundary change cannot move that surface's verdict.
investigation and a review-thread comment held in a tracker this session has
no access to; only the plan text reproduced in the task brief was available.
The line numbers it quotes are relative to an older revision of the checker,
which has since gained the prefix carve-out, the tracked-path surface and the
PR-text surface — the two divergences documented under "Judgment calls" above
follow from that.
Provenance
python3 -m unittest discover -s .github/public-repo-hygiene/tests: 202 run, 201 passed, 1 skipped, 0 failed (195 before this PR);python3 -m unittest discover -s .github/agents-md-integrity/tests: 46 passed, 0 failed;check_agents_md.py --root .: passed with 2 pre-existing warnings;check_public_repo_hygiene.py --root .: 1,359 findings before → 1,363 after, delta accounted for line by line (see corpus sweep); old-vs-new regex sweep overComfyUIandComfyUI_frontend: 0 new findings each;yaml.safe_loadon the edited workflow: parses.mainis used instead of the proposedCVE_PREFIX_RE); five of the seven proposed allowlist additions were omitted as already-covered-by-prefix and asserted behaviourally instead; the underscore cases went into sibling tests rather than intotest_shape_boundaries, whose pinned expectation the plan required be left unchanged; one comment line in the reusable workflow YAML was corrected despite the plan's "no change to the workflow YAML" — all four are argued under "Judgment calls" above. The "self-scan stays green" acceptance criterion is not met and was already false onmain; see "Residual".🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.