A requeued PR is ejected twice for checks that are green on its head

Open
#347 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
github, rust
Domain
ci-cd, devtools

Research direction

Start by tracing how mergeloop evaluates required check results when a requeued PR has a new head, and compare that path with the related replay behavior in #305. Reproduce the sequence in the issue: fail checks on one head, push a green head, then requeue. Done means ejection verdicts identify the evaluated head and old failures do not eject the new green head.

Written by the indexing model from the issue text.

Description

Observed

agent-labs-dev/nebula#13437 at head f53b762adc had all 34 check runs finished with no failure and the Migration Freshness status green. Two consecutive mergeloop runs exited 11 (ejected) naming "Integration Tests, Turn Query Budget (latency regression gate), Unit Tests" as failed, while the PR's status comment read "merges cleanly into main, and its checks passed". A third run with --after 3d0f2423576d00c5 and no code change merged it as 2042f9b3e5.

Those three checks had failed on the previous head (bdd2912400), before main was merged in.

Reproduction

Have a PR ejected for failed required checks, push a new head that turns them green, queue it again.

Status

Verified: the green head, the two ejections with their text, the merge on the third run.
Suspected cause: the ejection verdict is read from the earlier head's results, or replayed from the earlier need, after a new head exists (possibly related to #305).

Expected

An ejection names the head it judged, and a new green head is not ejected for the old head's checks.

Duplicates checked: #305 is related but describes --after replaying a resolved need.

Dominant language
Rust
Stars
6
Forks
0
Avg merge
4h 17m
Merged PRs (30d)
132

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from agent-labs-dev/mergeloop

All issues in agent-labs-dev/mergeloop

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.