Skip to content

Add issue triager: auto-label and auto-assign new issues - #597

Closed
Huzaifa Danish (huzaifa-d) wants to merge 6 commits into
mainfrom
user/modanish/Triager
Closed

Huzaifa Danish (huzaifa-d) wants to merge 6 commits into
mainfrom
user/modanish/Triager

Conversation

@huzaifa-d

@huzaifa-d Huzaifa Danish (huzaifa-d) commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds an issue-triage GitHub Action and consolidates overlapping label logic out of the policy service into it, so triage labeling + assignment has a single owner.

New: issue-triage Action

On issue opened / edited / assigned:

  1. Auto-labels via github/[email protected] using regex on title + body → OS-*, Container-*, Area-*. Patterns derived from previously triaged issues. Each label uses a single OR-alternation regex (the action ANDs multiple list entries).
  2. Auto-assigns area owners via actions/github-script@v7 (keyword match on title + body).
  3. Removes Needs-Triage once auto-triaged — an area label was applied or an owner is assigned.
File Purpose
.github/labeler.yml Regex → label config
.github/workflows/Issue.Labeler.yml Labeler + assignment + Needs-Triage removal

Assignee mapping

Area keywords Owner
network, firewall, iptables, proxy, dns, tcp/udp, ipv4/6 @bbonaby
linux, wslc, wsl, lxc, bubblewrap @SohamDas2021
appcontainer, base container, process isolation/container @jsidewhite
microvm, nanvix, hyperlight, windows sandbox @huzaifa-d
session isolation @adpa-ms
macos, darwin, seatbelt, xcode @richiemsft

Policy service consolidation

To avoid two systems doing overlapping triage, the following moved from .github/policies/ into the Action:

  • Removed the OS-Linux/MacOS/Windows rules from labelManagement.issueOpened.yml — the Action's regex applies OS-* across all issue types, not just Bug reports.
  • Deleted labelManagement.issueAssigned.yml — its only task removed Needs-Triage on assign. The Action now triggers on assigned and clears Needs-Triage there, preserving the behavior for manual assignments too.

The policy service keeps all unrelated behavior: adding Needs-Triage on open, Issue-* type labels, close cleanup, the author-feedback flow, and PR labelSync.

Design notes

  • sync-labels: 0 — labels are only added, never removed, so human triage decisions are preserved.
  • Issue-* type labels stay with the templates/policy (out of scope here).
  • No self-trigger loop: GITHUB_TOKEN actions cannot recursively trigger workflows, so the Action's own addAssignees/label changes don't re-run it; only human events do.
  • The regex config and assignment logic were adversarially reviewed by two independent cross-family models (GPT-5.5 and Gemini 3.1 Pro), which caught and fixed an AND-vs-OR semantics bug in the initial labeler config.

cc Soham Das (@SohamDas2021) (original author of the .github/policies/ label management) for review of the consolidation.

Adds a GitHub Actions workflow that assists issue triage on new/edited
issues:

- .github/labeler.yml: regex config for github/[email protected] that
  applies OS-*, Container-*, and Area-* labels based on issue title+body.
  Patterns derived from previously triaged issues. Each label uses a
  single OR-alternation regex (the action ANDs multiple list entries).
  sync-labels: 0 means labels are only added, never removed, so human
  triage decisions are preserved. Issue-type labels are left to the
  issue templates.

- .github/workflows/Issue.Labeler.yml: runs the labeler, then an
  actions/github-script step that auto-assigns area owners by keyword
  while preserving existing assignees.

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings July 1, 2026 18:44
@huzaifa-d
Huzaifa Danish (huzaifa-d) requested a review from a team as a code owner July 1, 2026 18:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an issue-triage GitHub Actions workflow to automatically apply area/OS/backend labels (via github/issue-labeler) and auto-assign likely area owners (via actions/github-script) when issues are opened or edited.

Changes:

  • Introduces .github/workflows/Issue.Labeler.yml to label and assign issues on opened / edited.
  • Adds .github/labeler.yml containing regex→label mappings for OS/Container/Area labels.
Show a summary per file
File Description
.github/workflows/Issue.Labeler.yml New workflow that runs labeler + owner auto-assignment on issue events.
.github/labeler.yml New regex configuration mapping issue title/body matches to OS/Container/Area labels.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 4
  • Review effort level: Low

Comment thread .github/labeler.yml Resolved
Comment thread .github/labeler.yml Resolved
Comment thread .github/labeler.yml Resolved
Comment thread .github/workflows/Issue.Labeler.yml Resolved
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
The assignment step now re-fetches the issue's labels (to observe what the
labeler step applied) and removes Needs-Triage when the issue has an
OS-*/Container-*/Area-* label or an assigned owner. A 404 on removal (label
already gone via a concurrent run) is ignored.

Co-authored-by: Copilot <[email protected]>
Move the OS-* labeling and Needs-Triage-on-assign behavior out of the
policy service and into the issue-labeler GitHub Action so triage has a
single owner:

- Remove the OS-Linux/MacOS/Windows rules from
  labelManagement.issueOpened.yml. The workflow's regex already applies
  OS-* labels across all issue types (not just Bug reports).
- Delete labelManagement.issueAssigned.yml. Its only task removed
  Needs-Triage on assignment; the workflow now triggers on 'assigned'
  and clears Needs-Triage there, preserving that behavior for manual
  assignments too.

The policy service keeps unrelated behavior: adding Needs-Triage on open,
Issue-* type labels, close cleanup, author-feedback flow, and PR labelSync.

Co-authored-by: Copilot <[email protected]>
sync-labels: 0
repo-token: ${{ github.token }}

- name: Assign owners and clear Needs-Triage

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: can we see if we can create teams and then assign items to the teams instead of single users. We can create a team for each backend, and then one for MXC core (which would be things for SDK functionality, infrastructure and non backend specific MXC things).

@huzaifa-d
Huzaifa Danish (huzaifa-d) marked this pull request as draft July 1, 2026 23:44
- Cap auto-assignment to the remaining slots (GitHub's 10-assignee max) and
  wrap addAssignees in try/catch so a full or re-edited issue never fails the
  triage job; base Needs-Triage removal on what was actually assigned.
- Add Martin (MGudgin) and Branden (bbonaby) as co-owners for AppContainer /
  BaseContainer / process isolation/container.
- Assign Soham (SohamDas2021) for proxy / iptables issues.

Co-authored-by: Copilot App <[email protected]>
@bbonaby

Copy link
Copy Markdown
Collaborator

should we close this one now?

Fills the assignment gap for issues in the SDK/schema/build/test areas,
which had labels but no owner. Extends the existing keyword-regex owner
map (kept one entry per login):

- MGudgin:    + SDK configuration / policy
- huzaifa-d:  + SDK API / executor schema / TypeScript build
- bbonaby:    + Rust build
- theelliotm: new owner for SDK / executor test infrastructure

Keywords mirror the Area-* patterns in labeler.yml. Validated with node
against 14 title/body samples (all route to the intended owner).

Co-authored-by: Copilot App <[email protected]>
@huzaifa-d

Copy link
Copy Markdown
Contributor Author

Discarding the github/issue-labeler approach. All triage changes (gateway crash hotfix + SDK/schema/build/test owner-map additions) are consolidated in #639 against the gh-aw workflow.

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.

4 participants