feat(forgejo): require branches to be up to date before merge #816
No reviewers
Labels
No labels
burndown-2026-06
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/infrastructure!816
Loading…
Reference in a new issue
No description provided.
Delete branch "outdated-branch-815"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
DESIRED_RULEalready ownedblock_on_outdated_branchand actively drove it toFalseon every protected repo, so this is a one-value flip rather than a new claim on server state.A pull request that went green against a base which has since moved proves the branch was good, not the merge result. Blocking an outdated head makes the tree CI tested the tree that lands.
Blast radius
Gates merges only.
enable_pushstaysTrueandrequired_approvalsstays0, so this adds no review gate and does not stop anyone pushing a protected branch directly.That matters because the fleet's automated writers push rather than open pull requests: the dispatch implementer lands on
main, and tap and scoop bumps land on their protected default branches. A grep across the CI of agentic-os, deploy, and infrastructure found no automated pull request merges, so nothing that merges unattended today starts failing.The cost is real but bounded: on a fast-moving repo a pull request needs its branch updated when
mainadvances underneath it. Every affected repo already allows update-by-rebase, so the web UI update button covers it.Docs
The rule's own documentation described it as a force-push and deletion boundary only, which stops being the whole truth. The module docstring, the skill reference, and
SKILL.mdall pick up the merge-side half, and each is careful to keep the still-true part: nothing compels work to arrive as a pull request, so thepull-request-and-mergelane stays ungated server-side. What is now gated is how a pull request may merge once one exists.The reference doc sat one line under its 80-line cap, so the redundant direct-invocation line comes out.
SKILL.mdalready documents those flags, pointing at the script as the owning source.scripts/forgejo_branch_protection_test.pycovers the engine rather than the policy values, so it needed no change.Verification
ward exec forgejo-branch-protection-testpasses (7 tests).pre-commit run --filespasses on all three changed files.Not verified: the live effect. Applying this needs the attended admin-token shell, which this session cannot hold. After merge, run
ward exec forgejo-branch-protection -- --dry-runin a real terminal to preview the fleet diff, then apply. Expect oneblock_on_outdated_branch: False -> Trueline per protected repo.If this Forgejo does not report the field back, the converge will name it as skipped rather than rewrite it, and the dry-run output will say so.
closes #815