Repository navigation
fix(upstream-sync): approve the held bot-PR run before merging - #61
Merged
Merged
Conversation
…to start, pin the step's guarantees
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Since GitHub's June 2026 change, a PR opened with
github.tokengets itspull_requestworkflow run held (action_required) until a user with write access approves it. That held run blocks themainruleset, even thoughupstream-syncalready dispatchedgate.ymlon the same commit and all three required checks passed there.This stalled sync PR #60 on Nov 29. The sync job opened #60. The dispatched gate passed
gate,smokeandstatechartwith the required app ID. The merge job then failed with "the base branch policy prohibits the merge". GraphQL showedmergeStateStatus: BLOCKEDwith no status rollup. Once I approved the held run (46279459801) and it passed, #60 turnedCLEAN,MERGEABLE, rollupSUCCESS, and merged as e0a95ac. Every sync after that stopped at the open-PR guard, including the Dec 2 run for upstream eb55343.What changes:
gate.ymlpull_requestrun at the sync commit, approves it with the job's own token, and waits for it to pass, then merges. If GitHub refuses the bot's approval, the job says so and the merge fails as before, leaving the PR open for a human. After approving, it waits for the run to leave its held state before watching it.actions: writeto approve, watch and cancel, pluscontents: writeandpull-requests: writeto merge.merge.landstep.omp-port/test-upstream-sync.shnow extracts and runs it against the gh stub, with three cases:PORTING.mddescribes the step.Unverified. GitHub does not document whether the workflow token may approve a held run. Third-party reports say it can with
actions: write. The next real sync shows which, because both outcomes print a line. Upstream eb55343 is already waiting, so the next scheduled run tests this.Verification
/usr/bin/bash omp-port/test-upstream-sync.shpasses.merge.land.action_requiredfilter fails "leaves a run that already finished alone".actionlint1.7.12 is clean on both workflows.CANON=/tmp/cursor-plugins /usr/bin/bash omp-port/check-port.shprintscheck-port: PASS.Review round
Reviewer: APPROVE (0.8). I applied its points. The cancel fallback is gone: a held run already reports
completed, so GitHub would refuse the cancel. The job now waits for the approved run to start before watching it. New cases pin that a failed held run blocks the merge, that the merge comes after the approval, and that only the gate'spull_requestruns on the sync branch are listed. Each of those mutations now fails the harness.