From 3c6fd325fb2c1cb19269e1d303c7964dff37dea9 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Sat, 21 Nov 2026 17:29:29 +0000 Subject: [PATCH 1/2] ci: require maintainer review for gate files through CODEOWNERS Add the root CODEOWNERS with one owner, the maintainer, over the gate files: workflows, scripts, images, lint and REUSE configs, sanity ignores, the changelog config, galaxy.yml, the contributor and agent docs and the apm setup. It owns itself, and Gitea reads the root path first. Gitea drops one backslash before compiling a pattern, so literal dots are written \\. and reach the engine as \. The pin files and README.md stay unowned. CODEOWNERS joins galaxy.yml build_ignore, so the tarball check does not refuse it, and the molecule selector's IGNORED, since no scenario reads it. Refs #144 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG --- CODEOWNERS | 35 ++++++++++++++++++++++++++++ galaxy.yml | 1 + scripts/select_molecule_scenarios.py | 1 + 3 files changed, 37 insertions(+) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..e91b740 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,35 @@ +# Gate files: a change to any of them waits for the maintainer's approval. +# Gitea reads this root file before docs/ and .gitea/, so no other CODEOWNERS shadows it. +# Patterns are regular expressions anchored at both ends, not globs. Gitea drops one +# backslash before compiling, so a literal dot is written \\. (a bare \. would match any +# character). Gitea skips a line that does not compile and never reports a pattern that +# matches nothing. +# One owner on purpose: every matching rule needs its own owner's approval. +# Not owned on purpose: requirements-dev.txt, requirements-dev.lock and requirements.yml, +# so Renovate's pin bumps keep automerging behind the bot-diff gate; README.md; roles. + +CODEOWNERS @Defame1297 +\\.gitea/.* @Defame1297 +scripts/.* @Defame1297 +images/.* @Defame1297 +tests/scripts/.* @Defame1297 +tests/sanity/ignore-.*\\.txt @Defame1297 +renovate\\.json @Defame1297 +\\.pre-commit-config\\.yaml @Defame1297 +\\.ansible-lint(-ignore)? @Defame1297 +\\.yamllint @Defame1297 +ruff\\.toml @Defame1297 +REUSE\\.toml @Defame1297 +changelogs/config\\.yaml @Defame1297 +galaxy\\.yml @Defame1297 +docs/adr/.* @Defame1297 +docs/contributing/.* @Defame1297 +docs/agents/.* @Defame1297 +CONTRIBUTING\\.md @Defame1297 +SECURITY\\.md @Defame1297 +GLOSSARY\\.md @Defame1297 +(.*/)?AGENTS\\.md @Defame1297 +\\.claude/.* @Defame1297 +apm\\.yml @Defame1297 +apm\\.lock\\.yaml @Defame1297 +\\.mcp\\.json @Defame1297 diff --git a/galaxy.yml b/galaxy.yml index a22713a..cc58577 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -44,6 +44,7 @@ build_ignore: - .ansible-lint - .ansible-lint-ignore - CLAUDE.md + - CODEOWNERS - CONTRIBUTING.md - GLOSSARY.md - SECURITY.md diff --git a/scripts/select_molecule_scenarios.py b/scripts/select_molecule_scenarios.py index 9b91bf8..c71bd9a 100644 --- a/scripts/select_molecule_scenarios.py +++ b/scripts/select_molecule_scenarios.py @@ -63,6 +63,7 @@ IGNORED = ( "SECURITY.md", "GLOSSARY.md", "CLAUDE.md", + "CODEOWNERS", "CHANGELOG.rst", "COPYING", "NOTICE", From 844c152d6ad3555856819357ee594c977427f994 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Sat, 21 Nov 2026 17:32:01 +0000 Subject: [PATCH 2/2] ci: say in CODEOWNERS when its approval is enforced The file only requests the maintainer's review; branch protection makes the approval required. Also say why some patterns match nothing yet, and that everything else is unowned. Refs #144 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG --- CODEOWNERS | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index e91b740..10c025a 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,12 +1,14 @@ -# Gate files: a change to any of them waits for the maintainer's approval. -# Gitea reads this root file before docs/ and .gitea/, so no other CODEOWNERS shadows it. +# Gate files: once branch protection requires code-owner approval, a change to any of +# them waits for the maintainer's. Gitea reads this root file before docs/ and .gitea/, so no other CODEOWNERS shadows it. # Patterns are regular expressions anchored at both ends, not globs. Gitea drops one # backslash before compiling, so a literal dot is written \\. (a bare \. would match any # character). Gitea skips a line that does not compile and never reports a pattern that # matches nothing. # One owner on purpose: every matching rule needs its own owner's approval. -# Not owned on purpose: requirements-dev.txt, requirements-dev.lock and requirements.yml, -# so Renovate's pin bumps keep automerging behind the bot-diff gate; README.md; roles. +# Some patterns name paths that do not exist yet, so the file is in place before they do. +# Everything else is unowned, so role changes merge on green checks. requirements-dev.txt, +# requirements-dev.lock and requirements.yml stay unowned on purpose, so Renovate's pin +# bumps keep automerging behind the bot-diff gate. CODEOWNERS @Defame1297 \\.gitea/.* @Defame1297