Repository navigation
Conversation
The main branch's ruleset needs one approving review from anyone with write access and doesn't require code-owner review, but the statement of sim.process.rule-machinery-code-owned doesn't say so. The new tests read the repository's registry and check that the statement: - still asks for a core developer's approval, word for word; - belongs to a rule that stays doc-only; - says that approval is a team convention GitHub doesn't enforce, and gives what the ruleset needs. The last test fails: the statement doesn't say that yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The statement of sim.process.rule-machinery-code-owned keeps its first sentence, which asks for a core developer's approval, and adds that this is a team convention: the default branch's ruleset needs one approving review from anyone with write access and doesn't require code-owner review. The rule stays doc-only. The code-owner rule tests now pass. The rules guard fails, because docs/generated/rules.md and the AGENTS.md rules block still show the old statement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ran python -m scripts.rules render, so docs/generated/rules.md and the AGENTS.md rules block show the new statement and the rules guard passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comment said changes to the listed files need a core developer's review, and that files left out "are not blocked". The main branch's ruleset doesn't require code-owner review, so nothing is blocked: listing a path only makes GitHub request a review from its owners on pull requests that aren't drafts. The comment now describes the approval as a team convention and says what the ruleset needs. No check reads this comment. Fixes #952 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anth-volk
force-pushed
the
code-owner-docs
branch
from
October 27, 2026 17:07
2aa2b3a to
581b909
Compare
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.
Fixes #952
Same-Repository Draft PR Check
PolicyEngine/policyengine-sim-api, not a personal fork.Summary
The docs implied GitHub won't merge a change to the rule files until a core developer approves it. The default branch's ruleset (
main, id 3680274) doesn't require that. It requires:CI completeandPR descriptionchecks.Its
require_code_owner_reviewisfalse, so CODEOWNERS only makes GitHub request a review from@PolicyEngine/core-developerson pull requests that change those paths and aren't drafts. This PR corrects the docs and leaves the ruleset unchanged.sim.process.rule-machinery-code-ownedstatement inrules/registry.toml. The first sentence, which says what the rule asks for, is unchanged. A second sentence says it's a team convention GitHub doesn't enforce, and gives what the ruleset needs. The rule stays doc-only.scripts/rules/tests/test_code_owner_rule.py, new. It reads the registry and checks that the statement still asks for the same approval, that the rule stays doc-only, and that the statement says GitHub doesn't enforce it.docs/generated/rules.mdand the AGENTS.md rules block, regenerated withpython -m scripts.rules render..github/CODEOWNERScomment. It said changes "need review from a core developer" and that files left out "are not blocked". It now says core-developer approval is a team convention, gives what the ruleset enforces, and says the listing only adds a review request. This is a prose-only edit: no check reads the comment.Left unchanged:
docs/engineering/skills/type-checking.md: Fix apis-integ's Pyright errors and enforce every Pyright rule #877 already corrected it.code-owned: renaming it would remove one rule and add another.changelog_entry.yamlentry "Added CODEOWNERS for the rule machinery", which is still accurate.Commits (red, then green)
test_rule_says_github_does_not_require_code_owner_reviewfails. The rules guard passes.Testing
Each commit was checked out on its own and run with the code-owner rule tests and
python -m scripts.rules guard --base-ref origin/main, with the results above. At the head commit:ruff format --check projects/*/src libs/*/srcandruff check .pass, and the new test file is formatted.python scripts/run_quality_guards.py: pass.python -m scripts.rules guard --base-ref origin/main: pass.python -m scripts.rules render: no diff.python -m unittest discover -s scripts/rules/tests -t .: 249 tests pass.🤖 Generated with Claude Code