BRANCHING: the escape hatch, now that apply_to_admins binds the owner too
All checks were successful
secrets-guard / encrypted (pull_request) Successful in 5s
shell-lint / shellcheck (pull_request) Successful in 8s
PR build (required check) / changes (pull_request) Successful in 13s
PR build (required check) / build-backend (pull_request) Has been skipped
PR build (required check) / build-frontend (pull_request) Has been skipped
PR build (required check) / validate-observability (pull_request) Has been skipped
PR build (required check) / gate (pull_request) Successful in 1s
secrets-guard / encrypted (push) Successful in 5s
shell-lint / shellcheck (push) Successful in 7s
All checks were successful
secrets-guard / encrypted (pull_request) Successful in 5s
shell-lint / shellcheck (pull_request) Successful in 8s
PR build (required check) / changes (pull_request) Successful in 13s
PR build (required check) / build-backend (pull_request) Has been skipped
PR build (required check) / build-frontend (pull_request) Has been skipped
PR build (required check) / validate-observability (pull_request) Has been skipped
PR build (required check) / gate (pull_request) Successful in 1s
secrets-guard / encrypted (push) Successful in 5s
shell-lint / shellcheck (push) Successful in 7s
Protection an admin walks through is documentation rather than a control, so apply_to_admins goes on — but that removes the direct-push route for everyone, including in an emergency, and the way back in should be written down before it is needed rather than improvised. There is no force flag; the supported route is lift the rule, act, restore it, with both halves audited. Names the failure mode that actually justifies it: a renamed status context makes the required check unsatisfiable, and with apply_to_admins on that blocks every merge into dev and main with no exemption for anyone.
This commit is contained in:
parent
890cb4a764
commit
1d4defefb9
1 changed files with 29 additions and 0 deletions
|
|
@ -179,6 +179,35 @@ else; say plainly where it came from rather than implying a check passed.
|
||||||
A hotfix that touches only one domain deploys only that domain. Check the other
|
A hotfix that touches only one domain deploys only that domain. Check the other
|
||||||
half's `/api/version` before assuming the fix is live end to end.
|
half's `/api/version` before assuming the fix is live end to end.
|
||||||
|
|
||||||
|
### When you genuinely need to push directly
|
||||||
|
|
||||||
|
`apply_to_admins` is on, which means these rules bind the owner too. That is
|
||||||
|
deliberate — protection an admin walks straight through is documentation, not a
|
||||||
|
control, and every account here is an admin — but it does remove the escape
|
||||||
|
hatch, so the way back in is worth writing down before it is needed at 3am.
|
||||||
|
|
||||||
|
There is no force flag. The supported route is to lift the rule, do the thing,
|
||||||
|
and put it back:
|
||||||
|
|
||||||
|
```
|
||||||
|
forge_branch_protection(branch="dev", delete=true) # rule gone; direct push allowed
|
||||||
|
git push origin dev # the emergency change
|
||||||
|
forge_branch_protection(branch="dev", apply=true) # restored to policy
|
||||||
|
```
|
||||||
|
|
||||||
|
Both the removal and the restore are audited, which is the point: the hatch is
|
||||||
|
open on the record rather than by a quiet exception. Restore it in the same
|
||||||
|
session — a protection rule "temporarily" removed is how a repo ends up
|
||||||
|
unprotected for a month.
|
||||||
|
|
||||||
|
The failure mode that actually justifies this: if the required status context
|
||||||
|
is ever renamed and no longer matches, **nothing can merge into `dev` or `main`
|
||||||
|
at all**, including by you, because `apply_to_admins` no longer exempts anyone.
|
||||||
|
`forge_pr_await` and `forge_pr_merge` both name that case explicitly when they
|
||||||
|
see it. The fix is to correct `pr-build.yml`'s workflow/job names and
|
||||||
|
`CENTRALIS_REQUIRED_CHECK` together — but if you need to land the fix itself,
|
||||||
|
lift the rule as above.
|
||||||
|
|
||||||
## Guardrails
|
## Guardrails
|
||||||
|
|
||||||
- Never force-push `dev`, `main` or `release`.
|
- Never force-push `dev`, `main` or `release`.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue