[REGRESSION] .gitea/scripts/tests/test_gitea_merge_queue.py — 2 failing tests on staging (mc#1032) #1031

Closed
opened 2026-05-14 15:04:08 +00:00 by core-qa · 0 comments
Member

Regression Description

.gitea/scripts/tests/test_gitea_merge_queue.py has 2 failing tests on origin/staging at SHA 4e8b40d1:

FAILED test_gitea_merge_queue.py::test_merge_decision_requires_main_green_pr_green_and_current_base
  AssertionError: assert 'pause' == 'merge'

FAILED test_gitea_merge_queue.py::test_merge_decision_updates_stale_pr_before_merge
  AssertionError: assert 'pause' == 'update'

Root Cause

Commit e16abf15 ("fix(queue): check push-required contexts explicitly, not combined state") changed evaluate_merge_readiness() to require the "CI / all-required (push)" context in main_status.statuses[] before approving a merge.

The tests still pass main_status={"state": "success", "statuses": []} (empty), so required_contexts_green({}, ["CI / all-required (push)"]) returns (False, ["CI / all-required (push)=missing"]) and the action becomes "pause" instead of the expected "merge" or "update".

Fix

Commit 0b47f951 ("fix(ci): repair delegation list and merge queue tests") on origin/main adds the missing push status to the test mocks:

main_status = {
    "state": "success",
    "statuses": [{"context": "CI / all-required (push)", "status": "success"}],
}

This fix is in origin/main but NOT in origin/staging. The staging branch is missing it.

Action Required

  1. Cherry-pick or apply commit 0b47f951 to the staging branch
  2. Open a PR targeting staging to merge the test fix
  3. Verify tests pass after fix

Labels

  • regression
  • ci
  • test
  • priority:medium
## Regression Description `.gitea/scripts/tests/test_gitea_merge_queue.py` has **2 failing tests on origin/staging** at SHA `4e8b40d1`: ``` FAILED test_gitea_merge_queue.py::test_merge_decision_requires_main_green_pr_green_and_current_base AssertionError: assert 'pause' == 'merge' FAILED test_gitea_merge_queue.py::test_merge_decision_updates_stale_pr_before_merge AssertionError: assert 'pause' == 'update' ``` ## Root Cause Commit `e16abf15` ("fix(queue): check push-required contexts explicitly, not combined state") changed `evaluate_merge_readiness()` to require the "CI / all-required (push)" context in `main_status.statuses[]` before approving a merge. The tests still pass `main_status={"state": "success", "statuses": []}` (empty), so `required_contexts_green({}, ["CI / all-required (push)"])` returns `(False, ["CI / all-required (push)=missing"])` and the action becomes `"pause"` instead of the expected `"merge"` or `"update"`. ## Fix Commit `0b47f951` ("fix(ci): repair delegation list and merge queue tests") on origin/main adds the missing push status to the test mocks: ```python main_status = { "state": "success", "statuses": [{"context": "CI / all-required (push)", "status": "success"}], } ``` This fix is **in origin/main but NOT in origin/staging**. The staging branch is missing it. ## Action Required 1. Cherry-pick or apply commit `0b47f951` to the staging branch 2. Open a PR targeting staging to merge the test fix 3. Verify tests pass after fix ## Labels - regression - ci - test - priority:medium
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#1031