Repository navigation
chore(norms): let the loop open host PRs, keep merging with the owner - #53
Merged
Merged
Conversation
The loop may now be the maker of changes to its own host (scripts/loop/**); the owner review is the checker, so a host change is no longer by itself a reason to route a task to needs-triage. The gate that keeps this honest is the ruleset, not the loop's restraint: the Main branch ruleset now carries require_code_owner_review and require_last_push_approval, and .github/CODEOWNERS owns '*' for the repository owner, so a bot approval cannot meet the review requirement.
Contributor
Coverage
|
Contributor
|
Loop triage — This PR is a norms-layer change ( Verified read-only
Findings for the human (not blockers the loop may act on)
No |
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.
What
Two halves of one change: the loop may be the maker of changes to its own host, and
the ruleset makes sure it still cannot be the one that merges them.
docs/agents/ops.md- a host change (scripts/loop/**) is no longer by itself areason to route a task to
needs-triage. The loop may open these PRs; the ownerreview is the checker. Review the diff, not the run log: the same PR can edit
gh-check.mjsand the agent prompts. This supersedes the host-change routingrecorded in the triage of The #50 pr author is wrong #52.
.github/CODEOWNERS(new) -*owned by the repository owner, plus explicitentries for
/.github/and/scripts/as the GitHub docs recommend, so a PRcannot quietly shed the ownership it is subject to (CODEOWNERS is read from the
base branch).
scripts/loop/README.md- ruleset payload and rationale updated for the two rulesthat were just switched on.
Ruleset change (applied through the API, cannot be a file change)
Main branch(id 21855851), read back from the API:current_user_can_bypassreads backpull_requests_only, so the owner can stillmerge. Why both switches exist:
pull-requests: write, so without a code-owner requirement it couldapprove a PR it did not author (one the owner opened, or a dependabot PR) and then
merge it with the
Contents: writeit needs for branch pushes;require_last_push_approvalstops a rewritten PR branch from being self-approved.Net effect: the loop keeps the ability to change its own host, and nothing reaches
mainwithout the owner approving it.Note
Dependabot PRs are covered by
*too, so they now need the owner approval as well(the bypass still allows merging them without a second reviewer).
Verification
gh api repos/Alex1990/tiny-oss/rulesets/21855851read back with both flags trueand
current_user_can_bypass: pull_requests_only.gh api repos/Alex1990/tiny-oss/codeowners/errorsreads thedefault branch, so it can only be checked after this lands.