Phase 1: distributed CODEOWNERS and automated reviewer routing (#4184) (#4189)

* Phase 1: distributed CODEOWNERS and automated reviewer routing (#4184)

- Replace the individual default CODEOWNERS owner with the core-maintainer
  team and add domain team ownership for extensions, plugins, content,
  hooks, workflows, .github, and eng.
- Add .github/review-routing.yml as the single source of truth for reviewer
  pools, routes, labels, and SLA settings (ships in dry-run mode).
- Add eng/review-routing.mjs (+ unit tests) with business-day math,
  least-loaded reviewer selection, routing and escalation planning, and
  workflow_run artifact validation.
- Add Review Routing (workflow_run/dispatch/schedule), Review Routing Request
  (read-only needs-reviewer reader), and Review Escalation (weekday schedule)
  workflows.
- Add needs-reviewer, review-overdue, review-escalated to setup-labels.
- Document the model in docs/maintainers/review-routing.md.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Address review feedback on reviewer routing and escalation

- Escalate at routedOn + escalation business days (Mon -> Fri)
- Leave labels untouched when requestReviewers fails and fail the job
- Serialize read/plan/apply per PR across routing and escalation
- Treat Label PR Intent artifact labels as authoritative
- Re-route to an uncovered pool on head changes without restarting SLA
- Use the due-label timestamp as the review boundary
- Fall back to pool/escalation teams and report what was requested

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Address second-round review feedback on review routing (#4184)

- CODEOWNERS: route /hooks/ and /workflows/ to content reviewers, drop the
  separate /.github/workflows/ rule, and leave per-resource owner lines as on
  main (their removal is deferred to a separate cleanup).
- Routing: ignore pending requests for unavailable reviewers when checking
  coverage; needs-reviewer excludes prior reviewers and changes nothing when no
  new reviewer can be requested.
- Escalation comments show the actual routing date.
- Cap sweep matrices at 256 targets and defer the remainder.
- Docs: best-effort load balancing, matrix cap, and needs-reviewer semantics.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Route workflow and hooks labels to the content pool (#4184)

Drop the workflow-security reviewer pool per maintainer feedback: agentic
workflows and hooks are reviewed like other content, and the repository's
own GitHub Actions workflows stay with core maintainers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Pin routing contract in tests; make CONTRIBUTING routing note dry-run aware

- Assert the exact label-to-pool mapping and priority order, pool set, and default/escalation pools for the shipped config.
- CONTRIBUTING.md: describe automatic routing as active only once dry_run is turned off.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Simplify dry_run validation condition

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Aaron Powell <me@aaron-powell.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
James Montemagno
2026-10-01 00:51:10 +00:00
committed by GitHub
co-authored by Copilot App Copilot Autofix powered by AI Aaron Powell
parent c442f0d917
commit 0c54bcee82
11 changed files with 2194 additions and 1 deletions
+22 -1
View File
@@ -1,5 +1,26 @@
# Ownership model: see docs/maintainers/review-routing.md
#
# - Teams own paths; no individual is the default owner. Do not add individual
# users to the `*` rule or to the team block below.
# - The last matching rule wins, so per-resource owners appended at the end of
# this file (for example by the `#codeowner` automation) override the team
# defaults for their specific paths.
# - Reviewer pools used for automatic review requests live in
# .github/review-routing.yml.
# Default owner for everything
* @aaronpowell
* @github/awesome-copilot-core-maintainers
# Domain reviewer teams
/extensions/ @github/awesome-copilot-canvas-reviewers
/plugins/ @github/awesome-copilot-plugin-reviewers
/agents/ @github/awesome-copilot-content-reviewers
/instructions/ @github/awesome-copilot-content-reviewers
/skills/ @github/awesome-copilot-content-reviewers
/hooks/ @github/awesome-copilot-content-reviewers
/workflows/ @github/awesome-copilot-content-reviewers
/.github/ @github/awesome-copilot-core-maintainers
/eng/ @github/awesome-copilot-core-maintainers
# Adding Dan Wahlin as the owner for the CLI for Beginners content and images
/website/src/content/docs/learning-hub/cli-for-beginners/ @DanWahlin