fix: dev-poll / reviewer gate on required contexts, not combined commit status #1136
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#1136
Loading…
Add table
Add a link
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?
Part of the architectural response to the 2026-04-21 CI chaos-monkey cascade (see incident #843 on Codeberg).
Problem
dev-poll and the reviewer-agent both consume the Forgejo combined commit status (
/commits/<sha>/status). Combined state is the worst of any status that ever attached to the commit — a non-required flaky workflow (e.g.edge-subpath/caddy-validate, see #1124) pins combined tofailure/pendingand wedges merge and re-poll logic, even though branch protection already declares which contexts actually gate merge.During the 2026-04-21 incident this turned one stuck optional step into a factory-wide freeze: reviewer refused to merge, dev-poll kept the PR in
awaiting-ci, and the admin had to resort toforce_merge: true.Desired behaviour
Agents read the branch-protection required_status_checks.contexts list via
and filter the per-context statuses to just that set when deciding
green/red/pending. Optional workflows still run and still show up in the PR UI — they just don't block automation.Fix sketch
ci_required_contexts(repo, branch)helper inlib/ci-helpers.shreturning the context list (cached per poll cycle).lib/pr-lifecycle.shwherever combined state is consulted, replace with a reducer over the required subset only.Acceptance
ciworkflow passes but a non-required workflow is stuckpending— reviewer-agent proceeds to merge, dev-poll does not block on it.ci_required_contextshelper is unit-tested against a mock forge response.combinedstate from decision code paths (grep check in CI).shellcheckclean.Related