Commit ddd383d
committed
fix(spec-drift): retry the promotion PR on every run, not only on commit runs
The first live dispatch of the repaired watcher proved the persistence fix works
— `spec-drift/auto-promotion` pushed clean, no GH006, content persisted for the
first time since 2026-07-06 — and immediately exposed a gap in the same step:
* [new branch] spec-drift/auto-promotion -> spec-drift/auto-promotion
::warning::promotion branch pushed, but opening the PR failed …
GraphQL: GitHub Actions is not permitted to create or approve pull requests
Pushing the branch and opening the PR are two different failure modes, but PR
creation lived INSIDE the has-new-commits branch. So a run that persisted the
branch and then failed to open the PR left the content sitting on a branch with
no review surface — and the next quiet run (nothing new to capture) took the
early `exit 0` and never retried. The promotion would stay unreviewed until
someone happened to read the branch list: the same silent stall this whole
mechanism exists to remove, one level up.
Splits the two. Pushing stays conditional on new commits; ensuring the PR exists
now runs on EVERY run for as long as `origin/<promo>` is ahead of the base,
guarded by `merge-base --is-ancestor` so a merged promotion does not reopen.
Chose retry-while-ahead over retrying only after a failed create because the
"branch ahead, no open PR" state is the thing that actually needs correcting,
whatever produced it — a failed create, a human closing the PR without merging,
or a transient API error. Testing the state is robust; remembering the event is
not.
The underlying repo setting was also enabled (`can_approve_pull_request_reviews`
on the Actions workflow permissions — the single toggle that gates BOTH creating
and approving PRs). Safe here: main requires 9 status checks with
`enforce_admins: true` and `required_pull_request_reviews: null`, so approvals
are not a merge gate and the approve half of the toggle confers nothing.
Verified: YAML parses, actionlint clean, harness re-pinned (`audit-harness
verify` → OK, one hash line changed). The behaviour itself is verified by the
next dispatch, which must open the PR for the already-pushed branch — the exact
case the old code could not reach.
Refs intent-solutions-io/intent-eval-platform#10, #111 parent a631a93 commit ddd383d
2 files changed
Lines changed: 32 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
649 | | - | |
| 649 | + | |
650 | 650 | | |
651 | | - | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
652 | 660 | | |
653 | 661 | | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
659 | 683 | | |
660 | 684 | | |
661 | | - | |
662 | 685 | | |
663 | 686 | | |
664 | 687 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments