Skip to content

ci: main's history rules are a ruleset of their own, which exempts nobody - #455

Merged
TylerVigario merged 1 commit into
mainfrom
ci/main-history-ruleset
Dec 2, 2026
Merged

TylerVigario merged 1 commit into
mainfrom
ci/main-history-ruleset

Conversation

@TylerVigario

Copy link
Copy Markdown
Owner

Closes #454.

main-history.json is a new payload: main-history-protection, on main, holding deletion, non_fast_forward and required_linear_history, with no bypass actor. main.json keeps pull_request, required_status_checks and code_scanning, with the release App its one bypass actor, as before.

A bypass reaches every rule of the ruleset that lists it, so the App is past only what a release commit cannot pass: the pull request, its checks and code scanning. It cannot delete main, force-push it or merge into it. A release still lands: createCommitOnBranch adds one commit on main's head, a fast-forward with one parent, which passes all three history rules as a squash merge does. Rulesets compose, so every write to main answers to both.

.github/rulesets/README.md gives main-history.json a section of its own, with the three rules' reasons moved there and why it exempts nobody. The paragraph on the App's bypass no longer says it could force-push or delete main.

Once merged, main-history-protection is created first and main.json applied to ruleset 20170625 after, so main is never without its history rules between the two.

JSON parses covers the new payload, contexts.sh finds all 126 contexts in main.json, and markdownlint passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TsLtVyz8wPocZ8oFBEnLcV

@TylerVigario
TylerVigario merged commit 9164f25 into main Dec 2, 2026
130 checks passed
@TylerVigario
TylerVigario deleted the ci/main-history-ruleset branch December 2, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The release App's bypass reaches main's history rules, so it could delete or rewrite main

1 participant