Skip to content

Rewrite CODEOWNERS for the refactored team structure - #16

Merged
scrothers merged 1 commit into
mainfrom
chore/codeowners-team-refactor
Jul 27, 2026
Merged

Rewrite CODEOWNERS for the refactored team structure#16
scrothers merged 1 commit into
mainfrom
chore/codeowners-team-refactor

Conversation

@scrothers

Copy link
Copy Markdown
Member

The org's teams were renamed and restructured, which broke every line of this file: gh api repos/pluggableharness/agent/codeowners/errors reported Unknown owner on all five entries.

Why the old file was inert even before the rename

The catch-all was last. GitHub applies the last matching pattern, not the most specific one. * @pluggableharness/core-maintainers sat on the final line, so it overrode the /api/, /docs/, and /pkg/ rules above it — plugin-maintainers, sdk-maintainers, and documentation-team were never requested for anything. The errors endpoint doesn't flag this: it's semantically valid, just not what was intended.

No team had repository access. All four teams had zero repo grants, and a code owner must have write access or better. That has been fixed org-side; every team named here now has write or above.

What changed

  • Catch-all moved to the top; the file is ordered broadest → narrowest, with that rule documented in the header so the trap isn't re-introduced.
  • Slugs updated to the new teams: maintainers, protocol-maintainers, sdk-maintainers, kernel-maintainers, frontend-maintainers, docs-maintainers, build-infrastructure, release-engineering, security-response, admins.
  • docs/specifications/ regains a dedicated owner. It's the wire contract — frozen at the first v* tag and permanent for every out-of-tree plugin — not documentation, so it shouldn't inherit the docs team.
  • Coverage added for paths that previously had no owner but the catch-all: internal/, cmd/, examples/, .claude/, go.mod/go.sum, buf.yaml, .golangci.yml, .goreleaser.yaml, and the release/security workflows.
  • Root-file patterns are slash-anchored, since a bare filename matches at any depth.

Not addressed here

protect-main currently sets require_code_owner_review: false, so this file is notification only — it does not gate merges. Flipping that is a repository-settings change, not a code change.

Verify after merge:

gh api repos/pluggableharness/agent/codeowners/errors

The four previous teams were renamed as part of an org-wide refactor, so
every line in this file referenced a slug that no longer resolves:
codeowners/errors reported Unknown owner on all five.

Two defects are fixed alongside the rename. The catch-all pattern was the
last line, and GitHub applies the last matching pattern rather than the
most specific one, so it overrode every rule above it and made the three
team-specific entries dead. It now leads, and the file is ordered broadest
to narrowest with that rule stated at the top.

Coverage also grows to the surfaces that had no owner but the catch-all:
internal/, cmd/, examples/, .claude/, the module and toolchain files, and
the release and security workflows. docs/specifications/ regains a
dedicated owner separate from docs prose - it is the wire contract, frozen
at the first v* tag, not documentation.
Copilot AI review requested due to automatic review settings July 27, 2026 18:24
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the repository’s CODEOWNERS file to reflect renamed/restructured org teams and to ensure intended ownership routing works correctly given GitHub’s “last match wins” rule.

Changes:

  • Reordered CODEOWNERS patterns from broadest to narrowest (catch-all first) and documented the rationale to prevent accidental overrides.
  • Updated all owner slugs to the new team structure and added coverage for previously unowned top-level areas and key root files.
  • Added narrower overrides for protocol/spec ownership and frontend-specific surfaces under broader /docs/, /pkg/, /internal/, and /cmd/ rules.

@scrothers
scrothers merged commit 981f5b4 into main Jul 27, 2026
14 checks passed
@scrothers
scrothers deleted the chore/codeowners-team-refactor branch July 27, 2026 18:41
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