ci: make build/test/clippy required status checks on main (#123) - #157
Merged
Conversation
Branch protection on main required only cargo-deny-advisories and cargo-deny-supply-chain, so a PR could merge with the build red, tests failing, or clippy warnings. Add the real DoD jobs (quick, linux, macos) to the required set and turn on enforce_admins so an admin cannot click-merge through a red required check. - scripts/branch-protection.sh: idempotent, self-verifying apply (--verify for a read-only audit). Surgical endpoints only, so required_signatures and the deliberately-absent required PR reviews (solo auto-merge) are untouched. strict=false is deliberate; rollback documented inline. - docs/AGENTIC-ENGINEERING.md: note the new required-check gate + the script as source of truth. The live protection is already applied and verified against this script. Closes #123
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
Makes the real Definition-of-Done CI jobs required to merge into
main, and turns on admin enforcement so the gate is real.Live protection is already applied and verified (this PR adds the reproducible record + docs):
Why
Before this, only the two
cargo-denyjobs gated merges, so a PR could merge with the build red, tests failing, or clippy warnings — contradicting the repo's paste-the-evidence DoD. Surfaced in the /autoplan review of #82.How
scripts/branch-protection.sh— single source of truth. Default applies the desired state and self-verifies;--verifyis a read-only drift audit (exit 1 on drift). Uses surgical endpoints (PATCHrequired_status_checks+ POSTenforce_admins), never a full PUT, sorequired_signaturesand the deliberately-absent required PR reviews (solo auto-merge workflow) are left untouched. Rollback documented inline.docs/AGENTIC-ENGINEERING.md— notes the new gate and points at the script.Decisions
enforce_admins=truebundled in: without it an admin can bypass a red required check, so required-checks alone would be a soft guardrail. Reversible:gh api -X DELETE .../protection/enforce_admins.strict=falsekept: the issue lists up-to-date-before-merge as optional; on a fast solo repo it forces a rebase before every merge. The script documents how to flip it on.Verification
shellcheck scripts/branch-protection.shcleanscripts/branch-protection.sh --verify→ PASS on both assertions post-applyCloses #123