git.pr.merge doesn't wait for required checks, and reports Forgejo's refusal as a moved branch #129
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?
Run 38 (
quick-fixon cmoriarty/soundcheck#71, the check of #123's fix) opened cmoriarty/soundcheck#72 at about 19:46 UTC on 2026-10-02. Auto-approve answered the merge gate at once, andgit.pr.mergeasked Forgejo to merge a minute later. Forgejo refused because the required checkCI / full (pull_request)was still running. That check takes about 19 minutes. The step's output:The run failed there (
no non-empty file matched: .osf/merged.json). The check then failed on its own after 18m49s, although the run's summary reportsnpm run test:fastand svelte-check green. Nobody has looked at why it failed yet. The pull request is still open.Two problems
merge_pull_request(src/osf/forgejo.py) merges as soon as the gate is answered. With auto-approve on, that is seconds after the pull request opens. So in any repository with a required check, the merge is refused every time, before the check can finish.merge_prreturnsFalsefor any 405 or 409 and logs Forgejo's message only as a warning. The step's error then guesses "the branch moved or it cannot be merged cleanly". But the branch had not moved, because the step checks the head sha itself first, and Forgejo had said why it refused.What to change
ci-conclusionpredicate pollsGET /commits/{sha}/status(src/osf/pipeline/ci.py);ci.full.dispatch/ci.full.awaitpair;merge_when_checks_succeed, which is the "When checks succeed" button on the pull request page.Shipped in
d94cfae, deployed on 2026-10-02 at 22:17. Archived in5d67ff9asopenspec/changes/archive/2026-10-02-merge-waits-for-checks.What changed
git.pr.mergestill asks for the merge at once, so a repository without required checks is not held up.OSF_STEP_DEADLINE, and the wait ends a minute before it. The merge step's limit went from 900 s to 7200 s.Verified on production
Left over
.arrives, and the agent-view spec fails under load #130