Commit a06dc67
ci: gate deploys on the last promoted commit, not the last push
The deploy job decides what to redeploy by diffing
`github.event.before..sha` — "what changed in THIS push". That silently
drops work whenever a run does not reach the deploy steps, and nothing ever
re-examines the range:
- Pushes to main do not cancel in-progress runs, but GitHub keeps only the
newest QUEUED run per concurrency group and cancels the rest.
- A run can fail on a job unrelated to what it changed.
Either way the next push diffs only its own range, so the skipped change
stays undeployed until some later commit happens to touch a gated path.
Seen live on 2026-08-31. #902 fixed the subagents agent URL under
cockpit/ag-ui/subagents/angular/ and merged green, but its run failed on an
unrelated website e2e regression before reaching the deploy job. The two
green runs after it touched no gated path, so the fix sat on main,
undeployed, next to the cockpit/runtimes examples stranded by two culled
runs. All three shipped ~2.5h later only because #907 incidentally touched
scripts/assemble-examples.ts. The failure mode is silent: main is green,
the deploy job is green, and production is stale.
Resolve the baseline once from refs/deploy/last-promoted, which advances
only after a fully successful, non-stale deploy job, and feed it to all
three gates. The range then covers everything not yet promoted rather than
one push.
Fail-safe by construction: with no marker (the first run after this lands)
or an unresolvable one, it falls back to the previous behaviour, and the
marker is never advanced by a stale, failed, or partial run — advancing
past unshipped work is precisely the bug being fixed.
Note: ag-ui-demo-deploy and posthog-sync-plan gate on github.event.before
the same way and are left alone here; each deploys a different target and
would need its own marker.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent fc65736 commit a06dc67
1 file changed
Lines changed: 56 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
653 | 657 | | |
654 | 658 | | |
655 | 659 | | |
| |||
675 | 679 | | |
676 | 680 | | |
677 | 681 | | |
678 | | - | |
679 | | - | |
| 682 | + | |
| 683 | + | |
680 | 684 | | |
681 | | - | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
682 | 713 | | |
683 | 714 | | |
684 | 715 | | |
685 | 716 | | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
686 | 729 | | |
687 | 730 | | |
688 | 731 | | |
| |||
702 | 745 | | |
703 | 746 | | |
704 | 747 | | |
705 | | - | |
| 748 | + | |
706 | 749 | | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | 750 | | |
711 | 751 | | |
712 | 752 | | |
| |||
739 | 779 | | |
740 | 780 | | |
741 | 781 | | |
742 | | - | |
| 782 | + | |
743 | 783 | | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | 784 | | |
748 | 785 | | |
749 | 786 | | |
| |||
840 | 877 | | |
841 | 878 | | |
842 | 879 | | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
843 | 888 | | |
844 | 889 | | |
845 | 890 | | |
| |||
0 commit comments