Skip to content

ci: make build/test/clippy required status checks on main (#123) - #157

Merged
hellno merged 3 commits into
mainfrom
hellno/123-required-status-checks
Jun 30, 2026
Merged

ci: make build/test/clippy required status checks on main (#123)#157
hellno merged 3 commits into
mainfrom
hellno/123-required-status-checks

Conversation

@hellno

@hellno hellno commented Jun 29, 2026

Copy link
Copy Markdown
Owner

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):

contexts: cargo-deny-advisories, cargo-deny-supply-chain, quick, linux, macos
enforce_admins: true     strict: false
required_signatures: true (preserved)     required_pull_request_reviews: absent (preserved)

Why

Before this, only the two cargo-deny jobs 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; --verify is a read-only drift audit (exit 1 on drift). Uses surgical endpoints (PATCH required_status_checks + POST enforce_admins), never a full PUT, so required_signatures and 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=true bundled 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=false kept: 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.sh clean
  • scripts/branch-protection.sh --verify → PASS on both assertions post-apply
  • This PR is itself now gated by the new required checks (dogfood).

Closes #123

hellno added 3 commits June 29, 2026 22:40
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
@hellno
hellno merged commit fe87a5e into main Jun 30, 2026
5 checks passed
@hellno
hellno deleted the hellno/123-required-status-checks branch June 30, 2026 08:06
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.

CI: build/test/clippy are not required status checks — only the cargo-deny jobs gate merges

1 participant