Repository navigation
fix(check): let --fix activate yolo when a credential environment admits the default branch - #1398
Merged
Merged
Conversation
…its the default branch Before activation, main carries maintainer's bypass, so its yolo branch-protection check fails and main drops out of the refs the credential-environment audit accepts. A reviewer-less environment admitting main then fails credential-environments, which --fix treats as an activation blocker, so every run reapplied maintainer rulesets and yolo could never be switched on. Accept main for that audit when it passes the maintainer check: the bot cannot write it at all then. Co-Authored-By: Claude <[email protected]>
This was referenced Sep 23, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 23, 2026
Add the restricted merge mode rename from #1408 to the 0.3.2 release notes, and align the existing #1398 note with that name. #1408 reached `main` during the release PR's CI wait and will be included in the immutable 0.3.2 tag. The tag remains unpushed until these notes are on `main`. All pre-commit hooks passed. > _This was written by Codex on behalf of max-sixty_
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.
tend check --fixcan't switch a repo tomerge: yolowhen the repo has a reviewer-less credential environment (e.g.deploy) whose policy admits the default branch. The fix accepts the default branch for the credential audit whenever it passes the maintainer protection check, so activation goes ahead.Why it looped. Before activation,
mainstill has maintainer'sneverbypass, sobranch-protection:mainfails against yolo'spull_requests_onlyexpectation.operational_refsonly admits branches whose check passed, somaindrops out and_policy_gaterejects the environment ("admits 'main', which tend has not verified the bot cannot write").credential-environmentsisn't in_yolo_activation_blockers's fixable set, so--fixfalls back to maintainer rulesets, and the final yolo re-run fails the same way. Every later--fixrepeats that. #1390 made this environment shape acceptable under yolo, but its test only covered a repo where yolo was already active.Why this is safe. A default branch that passes the maintainer check can't be written by the bot at all, so an environment admitting it is gated even more tightly than under active yolo. The extra maintainer-expectation read runs only when yolo is configured and the default branch failed its yolo check.
check_environmentfor thetendenvironment is unchanged: it's fixable and is re-derived after the rulesets are applied.Verification. The new
test_run_all_checks_yolo_accepts_main_deploy_before_activationruns the existing yolo deploy fixture withmainat theneverbypass. It fails before the change, and after itcredential-environmentspasses whilebranch-protection:mainstill fails, which is what--fixrepairs. The full Python suite passes, apart from the twotest_refresh_consumers.pytests that need network.