Skip to content

Decide: .github main branch protection allows admin-merge bypass of Strix/scheduler gate (enforce_admins: false) #1737

Open

Description

@seonghobae

Summary

.github's own main branch protection currently has enforce_admins: false, and strix is not in the required-status-check context list (verified live just now):

$ gh api repos/ContextualWisdomLab/.github/branches/main/protection --jq '{enforce_admins: .enforce_admins.enabled, required_checks: .required_status_checks.contexts}'
{
  "enforce_admins": false,
  "required_checks": ["close-empty","Detect CodeQL languages","CodeQL compatibility analysis (actions)","CodeQL compatibility analysis (python)","scan-pr-queue","dependency-review","osv-scan","osv-scan / osv-scan","trivy-fs","scorecard","noema-review","required-workflow-bootstrap","coverage-evidence","opencode-review"]
}

This means:

  • An admin-credentialed merge (gh pr merge --admin, or any caller with admin: true on the repo) can land a PR on .github's own main without Strix's result ever being platform-required, and
  • enforce_admins: false means even a scheduler bug or a bypassed scheduler has no platform backstop — an admin merge goes through regardless of check state.

Directly observed evidence this is not theoretical: PR #1658 merged at a head SHA whose only recorded opencode-review/strix check-runs at or before merged_at were cancelled (no SUCCESS conclusion anywhere in that head's history), and the surrounding pr-review-merge-scheduler.yml runs were themselves cancelled/skipped in that window — consistent with an admin-credentialed merge bypassing the scheduler's own gate via enforce_admins: false. Full writeup: docs/doctoring/contextual-orchestrator-gateway-enforcement-audit-20260902.md, "Item 2" section.

Why this needs an explicit owner decision, not a unilateral agent fix

This is a branch-protection (security/system) configuration change on the org's central governance repository, with real operational trade-offs on both sides:

  • enforce_admins: true would also block the repo owner's own legitimate emergency admin merges (e.g. the "Chicken-and-egg" bypass-merge cases the standing operating directive explicitly allows).
  • Adding strix as a hard-required context on .github's own branch could deadlock the self-modifying-PR case scripts/ci/pr_review_merge_scheduler.py's strix_evidence_state() docstring already documents: a PR editing strix.yml itself can legitimately fail the base branch's trusted CheckRun evidence against its own change.

Both are real, not hypothetical — which is why no agent session has applied this change unilaterally across at least two independent audits now.

Proposed options (owner to choose, or refine)

  1. Enable enforce_admins: true. Closes the bypass path entirely, including for the repo owner. Would need an explicit process for legitimate emergency/chicken-and-egg admin merges (e.g. a documented, logged "temporarily disable, merge, re-enable" runbook) so it doesn't block the org's own standing bypass-merge authorization.
  2. Add strix (and/or opencode-review) to the required-status-check contexts, paired with the self-modifying-PR deadlock mitigation the scheduler's own docstring anticipates (e.g. a documented exception path for PRs that touch strix.yml/opencode-review.yml itself).
  3. Both, sequenced to land the deadlock mitigation first.
  4. Explicitly accept the current trade-off (fast admin-merge capability over hard enforcement) and document it as a deliberate, recorded exception in docs/pr-review-and-merge-procedure.md / PR_GOVERNANCE_AUDIT.md — currently neither document mentions enforce_admins at all, so today's state reads as an oversight rather than a decision either way.

References

Activity

  1. seonghobae commented on Sep 2, 2026

    @seonghobae
    ContributorAuthor

    Update: this is a re-discovered gap, not a first-time find. A peer session's own private memory (written in an earlier, separate conversation, unrelated to this issue) already recorded the identical finding: ".github main branch protection missing strix + enforce_admins off, lets admin merges bypass review; needs owner action, never self-fix." That peer also independently noticed the same enforce_admins: false state while working on an unrelated PR today and, per that same "never self-fix" principle, did not act on it either.

    That means this gap has now been surfaced independently at least twice by different agent sessions across different work, and left unresolved both times — not because no one noticed, but because every session correctly treats it as an owner-only decision and stops there. Flagging this for prioritization: the options in the issue body above are ready to act on whenever there's owner bandwidth; no further investigation is needed to move forward on any of the four.

  2. added
    bugSomething isn't working
    type: bugDefect or incorrect behavior
    enhancementNew feature or request
    on Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority: highHigh-priority or P1 worktype: bugDefect or incorrect behavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions