baselining: dispatch the repo's PR CI on the maintenance branch - #566
Merged
Conversation
deliver() pushes the maintenance branch and opens its PR over the Action's GITHUB_TOKEN, and GitHub's recursion guard suppresses workflow runs for events that token authors - so the PR got no pull_request run, auto-merge armed against a green that never arrives, and the PR sat open forever (first observed on baselining's first real delivery, GoogleCalendarEventCreator#781). The guard's documented exception is workflow_dispatch, already proven fleet-side by the store-release chain. So deliver() now starts the PR's checks itself, after the force-push (a force-push emits no synchronize either, so every delivering cycle re-dispatches its own head): read the workflow files as they exist on the maintenance branch, dispatch every workflow that would have run on pull_request AND carries workflow_dispatch, and name any pull_request workflow that lacks the trigger - the owner's one-line fix - instead of leaving a silent no-checks PR. Workflows without a pull_request trigger are never touched: a dispatchable release orchestrator must not fire nightly. Trigger reading is a dependency-free textual scan of the top-level on: block (block map, inline scalar, inline list), unit-tested alongside the plan split. Canon's own ci.yml gains the workflow_dispatch trigger, so bot-authored PRs here (this flow, and migrations-retire's archive PR, #432) can be started the same way. Closes #565 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q7b9zCj2jdXbh5qtVSYavc
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.
Fixes the fleet-wide variant of #432: baselining's
deliver()pushes the maintenance branch and opens its PR over the Action'sGITHUB_TOKEN, whose events GitHub never turns into workflow runs — so the PR has zero checks, the auto-merge arm waits on a green that never arrives, and the PR sits open forever. First observed on baselining's first real delivery (GoogleCalendarEventCreator#781, unstuck only by a human re-push under a user token).The fix
workflow_dispatchis the recursion guard's documented exception (and already proven fleet-side — the store-release chain dispatches with the same token nightly). After the force-push,deliver()now:pull_requestand carriesworkflow_dispatch— the dispatched run's check runs land on the branch-head SHA, which is what the merge gate reads,pull_requestworkflow that lacks the trigger, so the owner's one-line fix is stated instead of a silent no-checks PR,pull_requesttrigger — a dispatchable release orchestrator must not fire nightly.Re-dispatched on every delivering cycle, since a bot force-push emits no
synchronizeeither. Best-effort like the auto-merge arm: a dispatch failure can't fail a converge that already pushed. No new secrets — this works in every member out of the box, unlike theFLEET_GITHUB_TOKENroute #432 used for the canon-only task.Trigger reading is a dependency-free textual scan of the top-level
on:block (block map, inline scalar, inline list), exported pure and unit-tested (7 new tests, written failing-first).Canon's own
ci.ymlgainsworkflow_dispatch:, so bot-authored PRs here (this flow, and migrations-retire's archive PR) can be started the same way.Verified
packs-tests/basics/baselining-worker.test.mjs: 23/23check_the_world: 0 blocking (9 pre-existing advisories on untouched engine files)Closes #565. Refs #432.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Q7b9zCj2jdXbh5qtVSYavc
Generated by Claude Code