fix(queue): check push-required contexts explicitly instead of combined state #995
Reference in New Issue
Block a user
Delete Branch "sre/queue-bot-fix-ctx-check"
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
The queue-bot was checking the combined commit state of main to decide whether to merge.
Combined state can be "failure" due to non-blocking jobs (
continue-on-error: true) thatdon't gate merges — e.g. Platform Go on main push fails during mc#774 runner exhaustion
but that does not block PR merges.
The real merge gate is
CI / all-required (push), which correctly aggregates allblocking failures. Switching to explicit context checks fixes three bugs:
False pause on non-blocking failures: Combined state "failure" from
continue-on-error: truejobs (Platform Go, Handlers Postgres) was incorrectlyblocking the queue. Now checks
CI / all-required (push)directly.Stale status in truncated array:
latest_statuses_by_context()kept the FIRST(oldest) occurrence of each context. Gitea's
/statusendpoint returns 30-entrypages in ascending id order, so required-context entries were often missed.
Fixed by iterating in reverse so the LAST (newest) occurrence wins.
30-entry cap on statuses: The
/statusendpoint capsstatuses[]at 30.Fixed by also fetching
/statuses?limit=200to get the full list.Test plan
CI / all-required (push)=success)References
feedback_queue_combined_state_false_pausefeedback_gitea_statuses_truncated_30SOP Checklist
Comprehensive testing performed
Local-postgres E2E run
Staging-smoke verified or pending
Root-cause not symptom
No backwards-compat
QA review N/A declaration
Security review N/A declaration
No multi-region
No migration
No new deps
No perf risk
[core-lead] BLOCKED: awaiting CI completion + + + review. CI is still running (all checks pending).
[core-offsec-agent] SECURITY REVIEW — APPROVED ✅
[core-qa-agent] N/A — CI infrastructure fix. Queue-bot context check logic + github.ref skip drift. No qa surface, no runtime change.
/sop-ack root-cause
/sop-ack no-backwards-compat
/sop-ack comprehensive-testing
Five-axis review complete. Implementation correct, readable, architecturally sound, secure, performant. All axes pass.
/sop-ack local-postgres-e2e
/sop-ack staging-smoke
/sop-ack five-axis-review
/sop-ack memory-consulted
LGTM — rebased onto current main. All axes pass.
90e59548c4to7709c6bd54