Skip to content

Red PRs keep landing on main: enforce_admins is off and the pre-push gate is routinely --no-verify'd #1645

Description

@macanderson

Problem

main has been red for most of 2026-08-05, twice, because red PRs are being merged
not because of merge skew, and not because anyone disabled a check. Both halves of the
latest breakage were merged with their required check already failing:

PR merged fmt + clippy + test at merge
#1632 22:25:24Z fail
#1623 22:26:06Z fail

gh pr checks 1632 and gh pr checks 1623 still show it. #1623 was even titled
"Unbreak main" — the repair PR itself went in red, so main went from 13 compile errors
to a different set rather than to zero. Repairing that took a third PR (#1641).

Why nothing stopped it

There are two gates and both are bypassed by the normal workflow here:

  1. Server side. main genuinely requires fmt + clippy + test,
    cargo deny + cargo audit, and harbor_adapter + analyzer pytest
    (gh api repos/macanderson/stella/branches/main/protection). But:

    "enforce_admins": { "enabled": false },
    "required_pull_request_reviews": { "required_approving_review_count": 0 }

    With enforce_admins off, an admin merge ignores the required checks entirely, and
    with zero required approvals nothing else is in the way.

  2. Client side. make hooks installs a pre-push hook that runs make gate, and
    AGENTS.md names it as the thing that "catches that on the author's push" precisely
    when enforce_admins is off. It is bypassed with SKIP_GATE=1 or --no-verify — and
    --no-verify is the standing convention for agent pushes in this repo, because the
    full gate is minutes of local compute on a laptop.

So the documented backstop for enforce_admins: false is the one that routine practice
turns off. There is no net.

What "done" could look like

This is a judgement call for the repo owner, not an obvious code change — hence an issue
rather than a PR. Options, roughly in increasing order of friction:

  • Flip enforce_admins to true. One API call. Makes the three required checks
    actually required for everyone. The cost is that a genuine emergency merge now needs the
    setting toggled off and back on deliberately, which is arguably the point.
    gh api -X POST repos/macanderson/stella/branches/main/protection/enforce_admins
  • Keep admin bypass but make merging red loud. A scheduled or push-triggered job on
    main that opens (or reopens) a tracking issue the moment main's head is red, so a
    broken default branch cannot sit unnoticed between sessions.
  • Make the local gate cheap enough not to skip. CARGO_SCOPE/make impacted already
    narrow it (Pre-push gate and CI run the full workspace for a single-crate diff #1135); GATE=fast exists. If --no-verify is being reached for because
    even the fast path is too slow, that is worth measuring — the escape hatch is being used
    as the default, which is the real signal.

Verify

After whatever change: attempt to merge a PR whose fmt + clippy + test is failing. It
must be refused, or must produce an immediate, visible alarm.

Context

This is the second pileup on the same day (#1634 was the first — 13 compile errors at
23d306a5). Related but distinct: #1527 covers auto-merge PRs deadlocking at BEHIND
under strict up-to-date protection, which is the opposite failure — protection being
too strict to make progress rather than too loose to stop a regression. Both point at the
same settings block.

Refs #1632, #1623, #1634, #1641, #1527

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Drop everything — broken or embarrassing for usersarea:ciGitHub Actions, release pipeline, packaging

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions