chore: fix CODEOWNERS pattern so default ownership applies - #774
Open
jnolen wants to merge 1 commit into
Open
Conversation
The default-owner line used `-` as its file pattern, a leftover Markdown list marker. `-` is valid CODEOWNERS syntax -- it matches a file literally named `-` -- so GitHub accepts the file without complaint and simply matches nothing. The repo has had no effective code owner as a result. Replace `-` with `*` so the already-declared owner takes effect. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
cspath1
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
The default-owner line in
CODEOWNERSmatches nothing:The leading
-is a leftover Markdown list marker, but CODEOWNERS reads the first token on a line as the file pattern.-is legal pattern syntax — it matches a file literally named-— so GitHub parses the line, finds no such file, and assigns the team to zero paths. The repo has had no effective code owner.This fails silently. GitHub's own validator reports nothing:
That empty result is not evidence the file works — the validator flags unparseable lines and unresolvable owners, not patterns that parse fine and match nothing. It returns
{"errors":[]}both before and after this change.The fix
Replace
-with*, the catch-all pattern the comment above it already describes. One character; no change to who owns the repo.Evidence it has been inert
@launchdarkly/team-foundationhas never been auto-requested as a reviewer. Across the last 15 PRs, the only review request is an individual added by hand:The bug predates every current owner. It has been present since the repo was open-sourced in #78, and five PRs have since re-pointed the owner across
ldcli-app-platform→team-feature-management→team-fm-next→team-fm-foundations→team-foundation(#382, #622, #633, #653, #715) without anyone noticing the line was inert. Worth noting: the/cmd/dev_server @launchdarkly/team-fundamentalsline that existed between #622 and #637 was well-formed, so for that windowdev_serverwas the only owned path in the repo.Practical impact is the missing auto-request. No ruleset on this repo requires code-owner approval today, so nothing was being bypassed — but PRs get no owner routing, and any tooling that reads CODEOWNERS to answer "who owns ldcli" gets an empty answer.
Why
team-foundationis the right ownerI confirmed this rather than inheriting it from the broken line:
maintain(write) access to this repo — so*resolves to a valid owner.nieblarais both the top human committer here and a member;cspath1authored the last-but-one CODEOWNERS change.One caveat for the reviewer. Ownership of this repo is genuinely contested. The Proposing the Agent Platform team doc states that
ld-cli"is also formally owned byteam-foundationper CODEOWNERS, but operationally the work is orphaned," and proposes moving it to a new Agent Platform team. That proposal is still at PLANNED status, soteam-foundationremains the formal owner today.This PR deliberately does not re-decide ownership — it makes the declared owner take effect. If Agent Platform lands, that is a one-line follow-up to the same file, and it will actually work once this is in.
Org-wide check for the same bug
I pulled
CODEOWNERSfrom all 759 non-archivedlaunchdarklyrepos (checkingCODEOWNERS,.github/CODEOWNERS, anddocs/CODEOWNERS) and parsed every rule. 271 repos have the file; 488 have none.ldcliis the only repo with the list-marker bug. No repo uses the other constructs GitHub silently drops (!negation,[...]character ranges).Two adjacent findings, both also returning
{"errors":[]}, neither fixed here:gha-ld-gosec@launchdarkly/team-product-securityethersphere/dbt/models/stg,/dbt/models/workspace_revops,/looker,/dbt/datagha-ld-gosecis worth a look by whoever owns it — it is a security-tooling repo whose intended owner isteam-product-security.Separate finding, not fixed here
gonfalon's.github/workflows/codeowners-coverage.ymlhascontinue-on-error: trueon the step that ends inexit 1for new files lacking coverage, so coverage gaps never fail CI. The step comment ("Report coverage gaps but don't fail the check") suggests this is intentional, but it sits alongside an::error::annotation and anexit 1that both read as enforcement. Flagging for the reviewer — it is a different repo and belongs in its own change.Testing
CODEOWNERS is not exercised by CI. Verified by inspection:
gh api "repos/launchdarkly/ldcli/codeowners/errors?ref=fix/codeowners-default-pattern"→{"errors":[]}.team-foundationconfirmed attached to this repo withmaintainpermission.@launchdarkly/team-foundation. Worth a glance on the PR after this one.via LD Research 🤖
Note
Low Risk
Single-character fix in CODEOWNERS with no runtime or security impact; only enables intended GitHub review routing.
Overview
Fixes a silent CODEOWNERS misconfiguration so the repo’s declared default owner actually applies.
The default-owner line used
-as the pattern (a leftover Markdown list marker). GitHub treats that as a literal filename, so@launchdarkly/team-foundationwas never assigned to any path and PRs did not get automatic owner review requests. The line is changed to*so it matches the catch-all behavior described in the comment above it; the owning team is unchanged.Reviewed by Cursor Bugbot for commit 303d4c5. Bugbot is set up for automated code reviews on this repo. Configure here.