Skip to content

Branch-protection rules on main

Last verified against GitHub UI as of 2026-04-28.

Branch protection on main is what prevents any change from landing without going through the regulated review flow. Several toggles work together: required PRs, required code-owner approval, dismiss-stale-on-new-commits, required status checks, and a narrowly-scoped bypass list for the auto-stamp App.

This page lists every toggle the BioFlow Pro repo runs main with.

Settings → Branches → Branch protection rules → main (classic) or Settings → Rules → Rulesets → <ruleset> (newer).

ToggleSettingWhy
Require a pull request before mergingONAll changes must go through PR review
Require approvals≥ 1Standard PR review
Dismiss stale pull request approvals when new commits are pushedONIf the developer pushes new content after approval, the approval no longer applies — protects against last-minute swaps. This is the rule that makes the auto-stamp REVIEWED_HASH content-binding meaningful at the GitHub level too.
Require review from Code OwnersONEnforces .github/CODEOWNERS — without this, the file is informational only
Require status checks to pass before mergingONThe PR pipeline jobs must be green before merge
Required status checksAll four pr_branch_tests.yml jobs (Dart Tests, Build & Package Installer, System Tests + RTM, Smoke + Benchmarks)The full regulated CI must succeed
Require branches to be up to date before mergingONForces rebase/merge of latest main before merge — prevents stale-base merges
Require conversation resolution before mergingON (recommended)Pending review comments must be resolved
Lock branchOFFWe need to be able to merge here
Do not allow bypassing the above settingsOFF (toggled via bypass list, see below)We need a narrow bypass for the auto-stamp App
ActorPermission
bioflow-autostamp (App)Bypass required pull requests (allows direct push to main)

Only the auto-stamp App is on the bypass list. Generic github-actions[bot] is not — that would grant every workflow in this repo the same bypass, which we explicitly chose against. See the auto-stamp tooling page for the design rationale.

SettingValue
Allow force pushesOFF
Allow deletionsOFF

Both must remain OFF on main. Force-pushing to main would discard regulated history; deleting main is self-evidently catastrophic.

The regulated property TRACE ALM provides — “every change to a regulated artefact has been approved by a qualified reviewer at this exact content” — depends on all of these working:

  • Required PR + required approval: every change goes through review
  • Dismiss-stale: approvals can’t outlive the content they approved
  • Require code-owner review: the approver is the qualified reviewer, not just anyone with write access
  • Required status checks: the post-processor’s --fail-on-suspect gate has to pass — that’s how unauthorised drift is detected pre-merge
  • No force-push, no delete: the audit trail is immutable

If any of those toggles is off, the regulated chain has a gap. Periodic verification that all toggles match this page is part of the regulated maintenance procedure.

To confirm the current settings against this playbook:

Terminal window
gh api repos/Corona-Project-Life/Bioflow-Pro/rules/branches/main \
--jq '.[] | {type, parameters}'

Or via the UI: open the branch-protection rule for main and walk through each toggle on this page.

If any drift is detected, fix it via the same admin who set it up originally and update this playbook in the same PR (the playbook self-owns via CODEOWNERS — no playbook drift either).