Validate OWNERS/OWNERTEAMS consistency in CI#5614
Merged
Merged
Conversation
The maintainer-approval gate trusts .github/OWNERS and .github/OWNERTEAMS, but nothing checked the two files for internal consistency. Onboarding a team is a hand-edit of both with no safety net, so a typo'd path or an undefined team alias slips through silently (an undefined team: resolves to zero owners and quietly falls back to maintainer-only approval). Add a 'node .github/scripts/owners.js validate' mode and run it in CI. Errors (block merge): a rule references a team not defined in OWNERTEAMS, a rule resolves to zero owners, or a rule maps a path that does not exist. Warnings (non-blocking): a defined team has no GitHub team-page URL. Remove the dead /acceptance/labs/ OWNERS rule (its directory does not exist), and run the validator on a full checkout so path existence can be verified. Co-authored-by: Isaac
96bd7c9 to
3aa1ab7
Compare
Collaborator
Integration test reportCommit: 3aa1ab7
22 interesting tests: 15 SKIP, 7 KNOWN
Top 24 slowest tests (at least 2 minutes):
|
pietern
approved these changes
Jun 16, 2026
Collaborator
Integration test reportCommit: d170c08
531 interesting tests: 479 MISS, 39 FAIL, 4 PANIC, 4 flaky, 3 KNOWN, 2 SKIP
Top 50 slowest tests (at least 2 minutes):
|
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.
Changes
validatemode to.github/scripts/owners.jsand run it in CI (test-owners-scripts.yml).team:not defined inOWNERTEAMS, a rule resolves to zero owners, or a rule maps a path that does not exist./acceptance/labs/OWNERS rule (the directory does not exist)..github/OWNERTEAMSchanges too.validateOwners,parseOwnersRules, andparseTeamPageUrls.Why
The
maintainer-approvalgate trusts.github/OWNERSand.github/OWNERTEAMS, but nothing checked the two files for internal consistency. Onboarding a team is a hand-edit of both with no safety net, so a typo'd path or an undefined team alias slips through silently (an undefinedteam:resolves to zero owners and quietly falls back to maintainer-only approval).Run against
maintoday, the validator surfaced two real drifts:/acceptance/labs/mapped a directory that did not exist (removed here), andteam:ai-traininghas no team-page URL (a warning, since a team can predate its GitHub page).Tests
node --test .github/scripts/owners.test.js .github/workflows/maintainer-approval.test.js(64 pass)node .github/scripts/owners.js validatepasses with the one expectedai-trainingURL warning./task checks,./task fmt-q,./task lint-q(0 issues)This pull request and its description were written by Isaac.