Skip to content

ci: classify current issues and pull requests with Qwen - #8312

Merged
Xuanwo merged 2 commits into
mainfrom
xuanwo/ai-labels
Sep 15, 2026
Merged

Xuanwo merged 2 commits into
mainfrom
xuanwo/ai-labels

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Sep 15, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

No linked issue. Replaces the retired hosted labeling automation.

Rationale for this change

PRs need release-note categories, and issues need type and component labels. Classify the current item with Cloudflare Workers AI using the Qwen model tested against OpenDAL examples. Keep the component catalog aligned with the repository so valid answers such as services/goosefs are available.

What changes are included in this PR?

  • Add event-driven labeling for opened, edited and reopened issues/PRs, plus PR synchronization. Process only the event's open item; no scheduled scan or backfill.
  • Separate issue types from PR release-note categories, validate component labels, detect explicitly declared breaking changes, and calculate PR size from changed lines.
  • Create missing label definitions from the service inventory and binding/integration directories. Preserve existing names and metadata.
  • Preserve existing classifications and maintainer-controlled labels. Component/breaking labels are additive; size labels are replaced.
  • Document label policy and setup, and add event/validation contract tests to Check CI.

The privileged PR workflow checks out only the default branch. PR code is never executed.

Are there any user-facing changes?

New or subsequently updated issues and PRs receive labels according to .github/LABELS.md. Existing history is not scanned.

Deployment requires the CLOUDFLARE_ACCOUNT_ID repository variable and CLOUDFLARE_API_TOKEN secret. The account variable and dedicated Workers AI Read API token secret are configured. End-to-end event-driven labeling in Actions remains to be verified after this workflow reaches the default branch. The final request format was exercised through the connected Cloudflare account on six real OpenDAL examples, and its returned responses passed the implementation's parser/validation. End-to-end Actions inference and label assignment with the workflow token remain unverified.

Classification remains approximate: testing found sensitivity to title prefixes and occasional component omissions. Maintainers can correct classifications; the workflow preserves existing primary labels.

Breaking changes

AI Usage Statement

  • Harness: Codex desktop. Model: GPT-6; exact identifier and reasoning effort are not exposed in this session. Role: investigated the retired workflow, evaluated replacements, implemented the classifier/workflow/tests, and drafted this PR.
  • Harness: Cloudflare Workers AI through its MCP API. Model: @cf/qwen/qwen3-30b-a3b-fp8. Effort: /no_think, temperature 0. Role: classified real PR/issue inputs during validation. It did not execute code or publish GitHub comments.

@Xuanwo
Xuanwo marked this pull request as ready for review September 15, 2026 16:07
@Xuanwo
Xuanwo requested a review from tisonkun as a code owner September 15, 2026 16:07
@Xuanwo
Xuanwo merged commit cccd7c9 into main Sep 15, 2026
22 of 23 checks passed
@Xuanwo
Xuanwo deleted the xuanwo/ai-labels branch September 15, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants