feat(standardize-repo): guard against CODEOWNERS owner drops on adopt#43
Merged
Conversation
A Path-B adopt renders CODEOWNERS from the single `code_owner` answer (`* @owner`), which can't represent a second owner or a team — so adopting over a repo with more owners silently dropped them (it dropped @AdmiralFraggle from sommerlawn-web). That's an access-control regression, not a tooling sync. - verify-applied.sh: new check that FAILS if any CODEOWNERS @owner present on `main` is missing post-adopt (skips cleanly with no main/CODEOWNERS). - mode-adopt-existing.md: restore-step note — CODEOWNERS is access control; restore/merge owners and confirm any change with the user. Pairs with harmon-init #149 (freezes CODEOWNERS via _skip_if_exists). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem: a Path-B adopt renders
.github/CODEOWNERSfrom the singlecode_owneranswer (* @owner), which can't represent a second owner or a team — so adopting over a repo with more owners silently drops them. This dropped@AdmiralFragglefrom sommerlawn-web's CODEOWNERS. That's an access-control regression that should be confirmed with the user, not auto-applied.Two safeguards (complementing harmon-init#149, which freezes CODEOWNERS via
_skip_if_exists):verify-applied.shguardrail — a new §7 check that diffs the@ownersin the pre-adopt CODEOWNERS (git show main:.github/CODEOWNERS) against the current one and FAILS if any owner present onmainis now missing. Skips cleanly when there's nomain, no CODEOWNERS, or it's not a git tree. Portable to macOS bash 3.2 (comm+ process substitution).mode-adopt-existing.mdguidance — the restore-from-main step now flags CODEOWNERS as access control: restore/merge owners and confirm any change with the user; dropping a code owner is a security regression, not a tooling sync.Verified: shellcheck
--severity=error+shfmt -dclean; owner-drop detection logic unit-tested (@AdmiralFraggledetected when dropped, empty when preserved); markdownlint clean.🤖 Generated with Claude Code