Problem
CODEOWNERS is high-value repository structure for review, security, and change-impact workflows, but cdidx does not index it.
This repository's .github/CODEOWNERS is reported as a language_support_candidate; files, search, symbols, and outline cannot inspect its patterns or owners.
Environment
origin/main: c642bc4c3dda4ef659df8e6b699e10f61da3c836
cdidx v1.44.3, locally built
- fresh repository index
- full net8.0 and net9.0 suites pass
Reproduction
dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll files \
--db .cdidx/codeindex.db --path .github/CODEOWNERS --json
dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll search '@' \
--db .cdidx/codeindex.db --path .github/CODEOWNERS --json
dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll languages \
--extension CODEOWNERS --json
All return no indexed language/file/results, while status --json lists the file as an unknown extensionless language-support candidate.
Motivation
First-class CODEOWNERS data would let users and agents answer:
- Who owns a file or directory?
- Which patterns mention a team, user, or email?
- Which rules are broad, ownerless, or overridden later?
- Which reviewers are relevant to impact/dependency results?
- Does a sensitive directory lack an effective owner?
Proposed solution
Add an exact-filename codeowners structural language/extractor.
At minimum:
- recognize supported CODEOWNERS locations and exact filenames;
- index raw text for ordinary search;
- emit one ordered rule symbol per pattern;
- retain owners and source line as structured metadata;
- support files, search, outline, and
symbols --lang codeowners;
- remove successfully indexed files from unknown-extension diagnostics.
Effective owner resolution for arbitrary paths can be included only if its precedence and syntax are implemented authoritatively; structural extraction must not pretend to implement authorization.
Focused PR scope
One PR should:
- add exact-filename detection for CODEOWNERS;
- implement a bounded line-oriented parser;
- emit rule symbols with pattern, owners, path, order, and line;
- preserve raw chunks and useful outline output;
- add language capability/catalog/help documentation;
- update unknown-extension classification;
- expose minimal structured queries through existing symbol/field facilities;
- add the bilingual changelog fragment.
Non-goals
- Do not call GitHub to resolve users or teams.
- Do not treat CODEOWNERS as an authorization boundary or infer permissions.
- Do not add every hosting provider's ownership format in this PR.
- Do not advertise reference/call graph support without meaningful semantics.
Implementation guidance and cautions
- GitHub searches
.github/, repository root, then docs/; document whether cdidx indexes all candidates and which one is effective.
- Preserve rule order because the last matching rule controls effective ownership.
- Handle comments, escaped leading
#, whitespace, ownerless rules, multiple owners, CRLF, and malformed lines conservatively.
- CODEOWNERS differs from full
.gitignore; do not add unsupported negation or character-range semantics.
- Bound patterns and owner strings with existing symbol/string budgets.
- Use a natural
rule symbol kind unless a new kind is justified.
- Keep
@org/team, @user, and email owners searchable without treating them as code references.
- If path matching is added, make precedence and unsupported syntax explicit and tested.
Required tests
.github/CODEOWNERS, root CODEOWNERS, and docs/CODEOWNERS.
- Multiple candidate locations and effective-file precedence.
- Comments, blank lines, escaped markers, whitespace, and CRLF.
- Multiple/team/email owners and ownerless rules.
- Duplicate and overlapping rules where later lines win.
- Invalid/oversized lines with bounded diagnostics.
- Files, raw search, symbols, and outline.
- Status unknown-extension behavior.
- Incremental add/update/delete and branch-switch indexing.
Acceptance criteria
.github/CODEOWNERS appears in files and raw search.
- Every valid ownership rule has a stable ordered structural result.
- Pattern and owners are directly queryable.
- Rule order and effective-file semantics are documented.
- CODEOWNERS is no longer reported as unknown after a current full scan.
- No graph capability is advertised unless intentionally implemented.
Duplicate preflight
No open or closed issue was found for first-class CODEOWNERS indexing or structural search.
Problem
CODEOWNERSis high-value repository structure for review, security, and change-impact workflows, but cdidx does not index it.This repository's
.github/CODEOWNERSis reported as alanguage_support_candidate;files,search,symbols, andoutlinecannot inspect its patterns or owners.Environment
origin/main:c642bc4c3dda4ef659df8e6b699e10f61da3c836cdidx v1.44.3, locally builtReproduction
dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll files \ --db .cdidx/codeindex.db --path .github/CODEOWNERS --json dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll search '@' \ --db .cdidx/codeindex.db --path .github/CODEOWNERS --json dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll languages \ --extension CODEOWNERS --jsonAll return no indexed language/file/results, while
status --jsonlists the file as an unknown extensionless language-support candidate.Motivation
First-class CODEOWNERS data would let users and agents answer:
Proposed solution
Add an exact-filename
codeownersstructural language/extractor.At minimum:
symbols --lang codeowners;Effective owner resolution for arbitrary paths can be included only if its precedence and syntax are implemented authoritatively; structural extraction must not pretend to implement authorization.
Focused PR scope
One PR should:
Non-goals
Implementation guidance and cautions
.github/, repository root, thendocs/; document whether cdidx indexes all candidates and which one is effective.#, whitespace, ownerless rules, multiple owners, CRLF, and malformed lines conservatively..gitignore; do not add unsupported negation or character-range semantics.rulesymbol kind unless a new kind is justified.@org/team,@user, and email owners searchable without treating them as code references.Required tests
.github/CODEOWNERS, rootCODEOWNERS, anddocs/CODEOWNERS.Acceptance criteria
.github/CODEOWNERSappears in files and raw search.Duplicate preflight
No open or closed issue was found for first-class CODEOWNERS indexing or structural search.