chore: manage Dispatch labels from labels.yaml#373
Conversation
a5c40fc to
e8f8e60
Compare
There was a problem hiding this comment.
AI Automated Review
Full PR review.
Analysis engine: MiniMax-M2.7@https://litellm.jory.dev/v1 (anthropic) — escalated (fast_low_confidence)
Review Summary
PR PR 373 adds version-controlled label management for Dispatch via a canonical .github/labels.yaml file and a pinned GitHub Actions workflow that syncs those labels using EndBug/label-sync. The changes are well-scoped, safe by design (delete-other-labels: false), and CI has passed both Validate and Docker Build.
Change-by-Change Findings
.github/labels.yaml (76 lines)
Defines 24 labels across five categories: Status (5), Priority (4), Type/Classification (8), Dispatch/Workflow (4), and Stable Agents (2). The Status and Priority labels exactly match the conventions documented in AGENTS.md. The two stable agent labels (agent/saffron-normal, agent/saffron-escalated) follow the agent/* prefix pattern. The file includes a trailing comment noting that repo-specific labels can be appended and that unknown labels are not pruned.
Notable labels not explicitly documented in AGENTS.md but present in the codebase: pr-review-fix (referenced in the OpenClaw contract and pr-fix-queue), ai-review (implied by ai-pr-review.yaml), and umbrella (referenced in lane classification docs as a parent/audit item marker). These appear to be intentional additions reflecting operational needs. The needs-escalation label is documented in routing rules as a legacy label that should NOT trigger ESCALATED routing, but it is included here as a stable Dispatch-managed label — this is acceptable as the routing logic explicitly disregards it.
.github/workflows/label-sync.yaml (39 lines)
A minimal, well-structured workflow that:
- Triggers on
workflow_dispatch(with adry_runtoggle) and on push tomainwhen.github/labels.yamlchanges. - Uses pinned SHA references for both
actions/checkout(v6.0.3, matching other workflows in the repo) andEndBug/label-sync(v2.3.3, commit52074158190acb45f3077f9099fea818aa43f97a). - Requests minimal permissions:
contents: readat the workflow level,issues: writeonly where needed for the sync step. - Sets
delete-other-labels: false, ensuring existing repo-specific, Renovate, and dynamicagent/*labels are preserved. - Uses sparse checkout to fetch only
.github/labels.yaml, keeping the checkout lightweight. - Sets
persist-credentials: falseon checkout, which is appropriate since the label-sync action authenticates via its own GitHub App installation token rather than needing persisted credentials.
Standards Compliance
| Convention | Status | Notes |
|---|---|---|
status/* labels follow documented pattern |
✅ Pass | All five status labels match AGENTS.md exactly |
priority/* labels follow documented pattern |
✅ Pass | p0–p3 match exactly |
agent/* labels follow documented pattern |
✅ Pass | Two stable agent labels use the agent/ prefix |
| No hardcoded agent names in generic docs | ✅ Pass | Labels file is operational config, not documentation; stable agent names are appropriate for Dispatch's own infrastructure |
| Pinned action references | ✅ Pass | Both actions use full SHA pins matching repo usage |
| Minimal workflow permissions | ✅ Pass | contents: read + issues: write only; no unneeded scopes |
| No commit of secrets | ✅ Pass | No secrets or credentials in the diff |
Linked Issue Fit
No linked issue was provided. The PR body states the goal is to version-control Dispatch-managed labels so label setup is no longer manual GitHub UI state. The implementation achieves this: a canonical YAML file drives label sync, and the workflow ensures the file stays applied on every main push. The Safety section accurately describes the non-destructive behavior (delete-other-labels: false).
Evidence Provider Findings
No evidence providers were configured for this review.
Tool Harness Findings
No tool harness requests were made for this review.
Unknowns / Needs Verification
None. The diff is self-contained, CI passed, the action is a well-known community tool with a pinned SHA, and the label set aligns with documented conventions and operational references found in the codebase.
Recommendation
Approve. The PR delivers version-controlled label management with a safe, minimal workflow. All label conventions are followed, permissions are scoped correctly, action references are pinned, and CI validates cleanly.
Why
Dispatch worker queues and PR workflows depend on stable labels such as
status/*,priority/*,agent/*, andai-review. This moves the canonical Dispatch-managed label set into.github/labels.yamlso label setup is version-controlled instead of manual GitHub UI state.What changed
.github/labels.yamlwith Dispatch status, priority, classification, workflow, stable agent,ai-review, and activeumbrellalabels.EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a.workflow_dispatchand runs when.github/labels.yamlchanges onmain.Safety
delete-other-labels: false.agent/*labels remain untouched unless explicitly listed in the config.Validation
.github/labels.yamlas YAML..github/workflows/label-sync.yamlas YAML.status/*,priority/*, stableagent/*, andai-reviewlabels are present.actions/checkoutand pinnedEndBug/label-syncreferences.contents: read,issues: write.delete-other-labels: falseis present.Dispatch worker labels are now version-controlled.