Skip to content

#796: CI is advisory, not a gate: no required status checks on develop (unprotected) or main - #798

Merged
JDonaghy merged 2 commits into
developfrom
issue-796-ci-is-advisory-not-a-gate-no-required-st
Sep 4, 2026
Merged

#796: CI is advisory, not a gate: no required status checks on develop (unprotected) or main#798
JDonaghy merged 2 commits into
developfrom
issue-796-ci-is-advisory-not-a-gate-no-required-st

Conversation

@JDonaghy

@JDonaghy JDonaghy commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Closes #796

Automated PR opened by coordinator for review of issue #796.

CI ran on every PR and push to main/develop but nothing enforced it:
`develop` (the default branch, where every agent branch lands) had no
protection object at all, and `main` had one with no
`required_status_checks` key. A PR with red checks was mergeable by
clicking the button.

Adds the settings as reviewable, testable repo config rather than
web-UI-only state:

- `.github/branch-protection.json` — single source of truth: the two
  required contexts plus per-branch policy. `strict: true` on main (it
  only receives the release PR), `strict: false` on develop (strict
  there would force a rebase + full re-run on every open branch each
  time another landed). `enforce_admins: false` is #796 decision (c) —
  the gate binds PRs and non-admin pushes, the owner keeps a deliberate
  escape hatch.
- `scripts/apply-branch-protection.sh` — `--dry-run` (offline preview),
  `--check` (audit live settings, report drift, non-zero on drift), and
  apply, which reads the settings back and verifies rather than trusting
  a 200. Idempotent. Needs an admin `gh` to apply, so the owner runs it.
- `tests/branch_protection.rs` — 6 tests. The load-bearing one asserts
  the required contexts equal the job `name:`s in ci.yml: GitHub matches
  required checks by name, so a rename leaves a context that never
  reports and blocks EVERY PR. Confirmed non-vacuous: renaming the GUI
  job to "Test (Linux, headless, GTK)" turns it red. The others drive
  the real script and assert on the exact JSON body it PUTs, including
  that --dry-run never invokes gh (booby-trapped gh on PATH).
- CLAUDE.md — new "Branch protection" section, and Path A is now flagged
  as an admin-only escape hatch that bypasses the gate.

Applying the settings to GitHub is a repo-settings action outside this
branch; nothing here changes the live protection state on its own.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Reviewer flagged (blocking): this repo's convention is workers never edit
CLAUDE.md — it's the coordinator's rulebook, and parallel worker edits
collide. This repo already reverted the identical mistake once (f93fb3d,
#657). Revert CLAUDE.md to its pre-#796 content; the coordinator can fold
equivalent guidance in separately.

Also drops the two dangling references to the now-removed CLAUDE.md
"Branch protection" section (in branch-protection.json's develop comment
and a test doc-comment), and softens the enforce_admins:false comment to
read as #796's recommended option pending owner sign-off rather than a
settled decision, per the review's non-blocking note.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@JDonaghy
JDonaghy merged commit 2d4d839 into develop Sep 4, 2026
2 checks passed
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 is advisory, not a gate: no required status checks on develop (unprotected) or main

1 participant