Renovate/Gitea merges PR while required-less commit status is PENDING (main has no branch protection) #188
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/OpenSpec
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
RFC - Request For Comments
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
hermes-attempted
hermes-needs-clarification
hermes-ready
hermes-review
hermes-wip
human-required
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
agentic-forges/forgejo-mcp#188
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Summary
PR #187 (Renovate docker-digest bump) merged at
02:18:05while the Tektonbuild-and-testtask was still running. The merge cancelled the PipelineRun, sobuild-and-testreportedTaskRunCancelled— it did not fail on merits, it was killed by the merge. Merge came first (02:18:05), cancellation 5s later (02:18:10).Timeline (2026-06-02)
code-scans,on-pull-request)code-scans→ successon-pull-requestnot done)on-pull-request→ cancelled (build-and-testTaskRunCancelled)Full commit-status history on head
7279457:Root cause —
mainhas zero branch protectionNo required status checks. At merge time the combined commit status was pending (
on-pull-requestpending since 02:16:49), yet the merge went through. Because no check is required, the pending status is non-blocking to the merge path.Open question (does not change the fix): which path ignored the pending status —
(a) Renovate client-side merge not treating the ambient pending status as blocking when no check is required, or
(b) Gitea/Forgejo native scheduled auto-merge, which has no definition of "green" without branch protection so merges immediately.
Both are downstream of the missing required checks; pinning it needs Renovate run logs.
Fix
Add branch protection on
mainrequiring both PaC contexts:A required check that is pending or absent makes the branch non-mergeable, so the merge waits until both contexts are present and
success— for both Renovate and Gitea native auto-merge.Acceptance
mainbranch protection requires both PaC status check contexts withenable_status_check=true.build-and-testbefore merge.Tracked in beads as
forgejo-mcp-f6h(P0 bug). Follow-up feature:forgejo-mcp-uc6(branch-protection management tools + resource-templates).Fixed — branch protection applied
Created branch protection rule on
main(HTTP 201, verified):A pending or absent required check now makes the branch non-mergeable, so neither Renovate nor Gitea native auto-merge can merge before both PaC pipelines report
success. This closes the merge-while-pending gap that sank PR #187.Verify on next Renovate digest PR: the PR should sit unmergeable until
build-and-test(theon-pull-requestcontext) goes green, instead of merging at the first cron tick.Follow-up:
forgejo-mcp-uc6— add MCP tools +forgejo://resource-templates to manage branch protection, so this config is visible/enforceable through the server itself.Closing as fixed.