Skip to content

fix: stop claiming CODEOWNERS is inheritable org-wide - #3

Merged
Bryan Fawcett (bryanfawcett) merged 3 commits into
mainfrom
claude/codeowners-scope
Sep 11, 2026
Merged

fix: stop claiming CODEOWNERS is inheritable org-wide#3
Bryan Fawcett (bryanfawcett) merged 3 commits into
mainfrom
claude/codeowners-scope

Conversation

@bryanfawcett

Copy link
Copy Markdown
Contributor

What this changes

PR #1 shipped .github/CODEOWNERS and described it as the org-wide default for every repo lacking its own. That is false. This corrects it.

Why

CODEOWNERS is not one of the files an org's .github repo can supply as a default. GitHub's inheritable list is CODE_OF_CONDUCT.md, CONTRIBUTING.md, discussion category forms, FUNDING.yml, issue and PR templates, SECURITY.md, SUPPORT.md — CODEOWNERS is absent, and the CODEOWNERS docs read the file from .github/, the root, or docs/ of the repository.

The API confirms it. repos/mzizi-dev/mzizi-console/community/profile resolves pull_request_template to mzizi-dev/.github — the fallback demonstrably works for templates — and reports codeowners: null.

The premise came from the brief this work was written against and went in unchallenged. It is precisely the kind of aspiration-stated-as-fact that ORG_STANDARDS.md claims not to contain, so it is worth correcting rather than leaving.

Changes

  • .github/CODEOWNERS now states its scope plainly and is narrowed to paths that exist here. It previously listed /compiler/, /primitives/, /wrangler.jsonc and /.gitleaks.toml — all in other repos, none of which could ever match from this file.
  • CODEOWNERS.example (new, at the root) is the per-repo template, following the pattern already set by dependabot.example.yml — the other thing with no org-wide fallback.
  • ORG_STANDARDS.md moves CODEOWNERS out of the inherited list, cites the docs, and adds gap 14: no repo in the org has working review routing, and this repo cannot fix that centrally. mzizi-registry has the only other CODEOWNERS and it assigns nobody (gap 1); the other seven have none.
  • Fixes gap ordering, which read 11, 13, 12 after the SHA-pinning entry went in at the wrong anchor.

The practical consequence

Worth knowing before anyone turns on require_code_owner_review in a ruleset: against a repo with no CODEOWNERS it does nothing, and against one with a broken CODEOWNERS it blocks every PR. Both states exist in this org right now.

Checks

  • actionlint clean.
  • All relative links and anchors in the Markdown resolve.
  • Every path named in the new .github/CODEOWNERS exists in this repo.

🤖 Generated with Claude Code

The previous PR shipped `.github/CODEOWNERS` described as the org-wide
default for every repo without its own. That is wrong, and it was wrong
in the brief this work was written against, so it went in unchallenged.

GitHub's list of community health files an organisation's `.github` repo
can supply as defaults is CODE_OF_CONDUCT.md, CONTRIBUTING.md, discussion
category forms, FUNDING.yml, issue and PR templates, SECURITY.md and
SUPPORT.md. CODEOWNERS is absent from it, and the CODEOWNERS docs read
the file from `.github/`, the root, or `docs/` "of the repository". The
community profile API agrees: mzizi-console resolves its PR template to
mzizi-dev/.github and reports codeowners as null.

So the file shipped last PR governs one repo — this one — and the claim
that it gave the org review routing was exactly the kind of aspiration
described as running that ORG_STANDARDS.md says it does not contain.

What changes:

  - `.github/CODEOWNERS` says plainly that it covers this repo only, and
    its rules are narrowed to paths that exist here. It no longer lists
    /compiler/ and /wrangler.jsonc, which are in other repos and were
    never going to match anything from here.
  - `CODEOWNERS.example` at the root is the thing to copy per repo,
    following the pattern already set by dependabot.example.yml — the
    other file with no org-wide fallback.
  - ORG_STANDARDS.md moves CODEOWNERS out of the inherited list and into
    a new gap 14: no repo in the org has working review routing, and this
    repo cannot fix that centrally. Eight small PRs can.

Also fixes the gap ordering, which read 11, 13, 12 after the SHA-pinning
entry was inserted at the wrong anchor.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The comment explaining why Dependabot needs a per-repo file drew the
contrast against "CODEOWNERS, issue templates and SECURITY.md" — which
asserts the very thing the rest of this PR corrects. Caught by grepping
every inheritance claim in the repo rather than only the ones in Markdown.

It now names both exceptions, since they are the same instruction:
copy the example file into each repo.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@bryanfawcett Bryan Fawcett (bryanfawcett) changed the title fix: CODEOWNERS is not inheritable, so stop claiming it is fix: stop claiming CODEOWNERS is inheritable org-wide Sep 11, 2026
Found the hard way: this PR's original title was "fix: CODEOWNERS is not
inheritable, so stop claiming it is", and the title lint rejected it.
The rule is right and the title was wrong, but the failure reads as a
style nit when it is really "your subject happens to start with a
filename that is spelled in capitals".

That will happen to anyone writing about CODEOWNERS, SECURITY.md, an API
or a CI job, which in an org-standards repo is often. Documenting the
reword is cheaper than answering it repeatedly, and much cheaper than the
alternative someone will eventually propose: relaxing the pattern to
allow leading capitals, which would stop it catching the actual mistake
it exists for.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@bryanfawcett
Bryan Fawcett (bryanfawcett) merged commit ee5f283 into main Sep 11, 2026
5 checks passed
@bryanfawcett
Bryan Fawcett (bryanfawcett) deleted the claude/codeowners-scope branch September 11, 2026 14:05
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.

1 participant