ops(forgejo): enable branch protection on main with base-is-main / guard required (QUEUED — post-RS2000 cutover only) #243

Closed
opened 2026-05-12 08:17:04 +02:00 by claude · 2 comments
Collaborator

Owner action required (NOT NOW — read below)

This issue tracks the operator-action follow-up auto-opened by ADR-0017 (PR #220) when the stack-guard layers ship.

Timing constraint (per operator decision 2026-05-12 ~02:15 CEST):

"Nie chcę tego teraz zmienić, ponieważ kodeks zbliża się do przepinki RS2000 i nie chcę wprowadzać żadnych zmian w tym momencie, bo jak możesz się domyślić to jest cholernie delikatna operacja."

DO NOT execute this issue until ALL of these are true:

  • Codex's PR #215 (Phase 3 apply stack rescue) merged to main
  • First platformctl apply cutover on RS2000 completes successfully (the rescue ships the apply pipeline; cutover is its first real use)
  • Post-cutover smoke pass: at least 24h of stable RS2000 state after cutover
  • Recovery batches (#216-#218 + any follow-ups) all merged
  • No active in-flight stacked PR work (operator confirms)

Reason: enabling required status checks right now could block Codex's in-flight PRs (the new base-is-main workflow may not yet have run on PRs opened before ADR-0017 merge, producing missing-required-status-check failures). Operator's intent: zero changes during the cutover window.


When you're ready to execute (~30 seconds)

  1. Open: https://git.pdurlej.com/pdurlej/platform/settings/branches
  2. Edit (or create) the protection rule for branch main
  3. Enable: ☑ "Require status checks to pass before merging"
  4. Add to required contexts list:
    • base-is-main / guard
  5. Optional but recommended: also require these contexts (already running on all PRs):
    • canary-required / collect-diff
    • canary-required / canary
  6. Click "Save"
  7. Comment on this issue with done — branch protection active YYYY-MM-DD HH:MM and close.

Verification (post-enable)

Open a deliberately-stacked test PR (e.g., a no-op branch from main rebased onto a feature branch with base: <feature-branch>). Expected:

  • base-is-main / guard status check returns red
  • Forgejo UI Merge button is disabled for that PR
  • After applying label tier/stacked to the test PR, status check turns green (escape hatch verified)

Then close the test PR without merging.

What this issue is NOT

  • NOT a code change. Pure Forgejo settings UI action.
  • NOT urgent. ADR-0017's Layer 2 (post-merge audit) runs regardless of branch protection and provides the detection backup until enablement.
  • NOT blocking any current Codex work.

References

  • PR #220 (ADR-0017 — no stacked PRs to main + 4-layer guard) — once merged, ship this issue
  • PR #215 (Codex's Phase 3 apply stack rescue) — must merge + cutover before enabling protection
  • decisions/0017-no-stacked-prs-to-main.md § Consequences > Negative > "Forgejo branch protection toggle is operator-action"
  • state/pan-herbatka-day1-checklist.md § 13 (operator pre-merge mental check; works even before protection enabled)

🍵 — auto-opened by Pan Herbatka 2026-05-12 ~02:20 CEST, per ADR-0017 acceptance criterion.

## Owner action required (NOT NOW — read below) This issue tracks the operator-action follow-up auto-opened by ADR-0017 (PR #220) when the stack-guard layers ship. **Timing constraint** (per operator decision 2026-05-12 ~02:15 CEST): > *"Nie chcę tego teraz zmienić, ponieważ kodeks zbliża się do przepinki RS2000 i nie chcę wprowadzać żadnych zmian w tym momencie, bo jak możesz się domyślić to jest cholernie delikatna operacja."* **DO NOT execute this issue until ALL of these are true:** - [ ] Codex's PR #215 (Phase 3 apply stack rescue) merged to main - [ ] First `platformctl apply` cutover on RS2000 completes successfully (the rescue ships the apply pipeline; cutover is its first real use) - [ ] Post-cutover smoke pass: at least 24h of stable RS2000 state after cutover - [ ] Recovery batches (#216-#218 + any follow-ups) all merged - [ ] No active in-flight stacked PR work (operator confirms) Reason: enabling required status checks **right now** could block Codex's in-flight PRs (the new `base-is-main` workflow may not yet have run on PRs opened before ADR-0017 merge, producing missing-required-status-check failures). Operator's intent: zero changes during the cutover window. --- ## When you're ready to execute (~30 seconds) 1. Open: https://git.pdurlej.com/pdurlej/platform/settings/branches 2. Edit (or create) the protection rule for branch `main` 3. Enable: ☑ "Require status checks to pass before merging" 4. Add to required contexts list: - `base-is-main / guard` 5. Optional but recommended: also require these contexts (already running on all PRs): - `canary-required / collect-diff` - `canary-required / canary` 6. Click "Save" 7. Comment on this issue with `done — branch protection active YYYY-MM-DD HH:MM` and close. ## Verification (post-enable) Open a deliberately-stacked test PR (e.g., a no-op branch from `main` rebased onto a feature branch with `base: <feature-branch>`). Expected: - `base-is-main / guard` status check returns **red** - Forgejo UI Merge button is **disabled** for that PR - After applying label `tier/stacked` to the test PR, status check turns green (escape hatch verified) Then close the test PR without merging. ## What this issue is NOT - NOT a code change. Pure Forgejo settings UI action. - NOT urgent. ADR-0017's Layer 2 (post-merge audit) runs regardless of branch protection and provides the detection backup until enablement. - NOT blocking any current Codex work. ## References - PR #220 (ADR-0017 — no stacked PRs to main + 4-layer guard) — once merged, ship this issue - PR #215 (Codex's Phase 3 apply stack rescue) — must merge + cutover before enabling protection - `decisions/0017-no-stacked-prs-to-main.md` § Consequences > Negative > "Forgejo branch protection toggle is operator-action" - `state/pan-herbatka-day1-checklist.md` § 13 (operator pre-merge mental check; works even before protection enabled) 🍵 — auto-opened by Pan Herbatka 2026-05-12 ~02:20 CEST, per ADR-0017 acceptance criterion.
Owner

Codex live audit: branch protection is now live — 2026-05-18 16:56 CEST

Verified through Forgejo API:

  • main.protected = true
  • required_approvals = 1
  • enable_status_check = true
  • required context includes base-is-main / guard

This part appears complete. If no other branch-protection requirements are intended here, this issue can be updated/closed after an operator confirms the UI matches the API.

Caveat: this does not mean full canary enforcement is complete. canary-required.yml is still scaffold/readiness-only and the Infisical canary env file is missing.

<!-- codex-actions-audit-2026-05-18 --> ## Codex live audit: branch protection is now live — 2026-05-18 16:56 CEST Verified through Forgejo API: - `main.protected = true` - `required_approvals = 1` - `enable_status_check = true` - required context includes `base-is-main / guard` This part appears complete. If no other branch-protection requirements are intended here, this issue can be updated/closed after an operator confirms the UI matches the API. Caveat: this does not mean full canary enforcement is complete. `canary-required.yml` is still scaffold/readiness-only and the Infisical canary env file is missing.
Collaborator

W9 issue cleanup: closing as done/superseded.

Reason: Branch protection on main is already active with required status checks.

Evidence: Forgejo branches/main API: protected=true, required_approvals=1, enable_status_check=true, required contexts include 'base-is-main / guard (pull_request)' and 'patchwarden-pr-sanity / sanity (pull_request)'.

If this becomes relevant again, reopen with current acceptance criteria or create a smaller fresh issue from current main.

W9 issue cleanup: closing as done/superseded. Reason: Branch protection on main is already active with required status checks. Evidence: Forgejo branches/main API: protected=true, required_approvals=1, enable_status_check=true, required contexts include 'base-is-main / guard (pull_request)' and 'patchwarden-pr-sanity / sanity (pull_request)'. If this becomes relevant again, reopen with current acceptance criteria or create a smaller fresh issue from current main.
codex closed this issue 2026-05-27 09:17:03 +02:00
Sign in to join this conversation.
No labels
W6d-automerge-calibration
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
automerge-candidate
class/security-sensitive
cutover-gate
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
iterating
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
large-impact
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
meta
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
needs-operator-decision
needs-triage
not-ready
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
operator-emotional
owner-attention
phase/02
phase/03
priority:p0
priority:p1
priority:p2
priority:p3
proposed
ready-for-agent
ready-for-operator
recovery
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
risk/exposure
risk/process
risk/product
risk/runtime
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tier/full
tier/lite
tier/stacked
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pdurlej/platform#243
No description provided.