Problem
GitHub teams have parent/child hierarchy. If CODEOWNERS references a parent team and catalog-info.yaml references a child team (or vice versa), the tool reports "mismatched" even though the child inherits the parent's permissions.
Example:
- CODEOWNERS:
@acme-corp/platform (parent)
- catalog-info.yaml:
group:platform-frontend (child)
- Current result:
mismatched
- Arguably correct: child inherits parent permissions
Context
In practice, when a parent team (department/org-level) is listed as owner instead of a specific child team, it often signals that nobody has claimed real ownership — it's a default that was never narrowed down. This is worth surfacing differently from a genuine parent-vs-child mismatch.
Possible approach
- Fetch team hierarchy via GitHub API (
GET /orgs/{org}/teams/{team}/children)
- When comparing teams, check if one is an ancestor of the other
- Consider a distinct alignment status (e.g.,
HierarchyMismatch) to differentiate from unrelated team mismatches
- Potentially flag parent-team-as-owner as a smell ("owned by a department, not a team")
Complexity
Adds API calls to resolve hierarchy and complicates the reconciliation logic. Not needed for v1 where exact string matching is sufficient and broadly correct.
Problem
GitHub teams have parent/child hierarchy. If CODEOWNERS references a parent team and catalog-info.yaml references a child team (or vice versa), the tool reports "mismatched" even though the child inherits the parent's permissions.
Example:
@acme-corp/platform(parent)group:platform-frontend(child)mismatchedContext
In practice, when a parent team (department/org-level) is listed as owner instead of a specific child team, it often signals that nobody has claimed real ownership — it's a default that was never narrowed down. This is worth surfacing differently from a genuine parent-vs-child mismatch.
Possible approach
GET /orgs/{org}/teams/{team}/children)HierarchyMismatch) to differentiate from unrelated team mismatchesComplexity
Adds API calls to resolve hierarchy and complicates the reconciliation logic. Not needed for v1 where exact string matching is sufficient and broadly correct.