mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #180] [MERGED] feat(area-label): reusable agentic PR area-label classifier #187
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#187
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/180
Author: @luke-mino-altherr
Created: 8/18/2026
Status: ✅ Merged
Merged: 8/19/2026
Merged by: @luke-mino-altherr
Base:
main← Head:luke/area-label-reusable📝 Commits (4)
d862079feat(area-label): reusable agentic PR area-label classifiera7d032dci(area-label): fix shellcheck source dirs and adopt the recognized ref guard31a61a3ci(area-label): address CodeRabbit review — ancestry guard, fail-soft, validationd3204cddocs(area-label): list AREA_LABEL_CALLERS in the README roster enumeration📊 Changes
11 files changed (+1074 additions, -2 deletions)
View changed files
➕
.github/workflows/bump-area-label-callers.yml(+105 -0)➕
.github/workflows/pr-area-label.yml(+298 -0)➕
.github/workflows/test-area-label.yml(+48 -0)📝
README.md(+4 -2)📝
docs/callers/README.md(+2 -0)➕
docs/callers/pr-area-label.md(+127 -0)➕
scripts/area-label/README.md(+48 -0)➕
scripts/area-label/classify-and-apply.sh(+154 -0)➕
scripts/area-label/lib.sh(+135 -0)➕
scripts/area-label/sync-labels.sh(+51 -0)➕
scripts/area-label/tests/test_lib.sh(+102 -0)📄 Description
Ports the agentic area-label classifier from
Comfy-Org/comfy-infra(#815) into a shared reusable workflow, so cloud, comfy-infra, and any other repo share one hardened implementation and keep only a thin caller + their own taxonomy. This is the risk-grader pattern Matt asked for on comfy-infra#815 (move the logic here; each repo defines its own area labels).What this adds
.github/workflows/pr-area-label.yml— reusable (workflow_call), two jobs under one taxonomy:sync-labels—gh label create --forcereconcile of the consumer'sarea:*labels to its YAML. No secret.label-pr— classifies each PR into exactly onearea:*label.scripts/area-label/— the logic, loaded from the pinnedworkflows_ref:lib.sh— pure, network-free core (taxonomy parse, the two validation gates, request build, reply parse).sync-labels.sh/classify-and-apply.sh— the two jobs' bodies.tests/test_lib.sh— hermetic suite, 25 cases, no network..github/workflows/test-area-label.yml— shellcheck + suite on change..github/workflows/bump-area-label-callers.yml— pin-bump fleet (AREA_LABEL_CALLERSroster).docs/callers/pr-area-label.md+ rows inREADME.mdanddocs/callers/README.md.Reusability
Nothing repo-specific is baked in. Per-repo framing (the domain-vs-path judgement calls) lives in the consumer taxonomy's optional top-level
repo_context:key, injected into the system prompt; the invariant scaffolding (classify-by-purpose, trust the conventional-commit scope, treat<pr_data>as untrusted) is fixed inbuild_system. Consumers keep.github/area-labels.yml; there is no generic default taxonomy (area labels are inherently per-repo — a missing taxonomy skips cleanly with a warning).Security model (preserved from the comfy-infra port, CodeRabbit-hardened)
<pr_data>tags, diff excluded.area:*names.area:[a-z0-9-]+names; every label resolves to a non-blank routing guide) before it drives a write.area:*add/remove ops, never a full-set PUT — concurrent non-area edits survive; add-before-cleanup; delete tolerates only HTTP 404.workflows_refvalidated to a full 40-hex lowercase SHA before any checkout.Testing
bash scripts/area-label/tests/test_lib.sh→ 25 passed, 0 failed (local).shellcheck -xclean across all four scripts.Rollout
Two-step per the caller contract: land this, then a maintainer adds each repo to
AREA_LABEL_CALLERSandworkflow_dispatches the bump fleet once. The comfy-infra caller (replacing the repo-local workflow in #815) is the first consumer and will be opened against the merged SHA.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.