Skip to content

fix(ci): re-arm release-merge via workflow_run instead of check_suite - #319

Merged
Shinrai merged 2 commits into
nextfrom
fix/release-merge-schedule-fallback
Sep 21, 2026
Merged

Shinrai merged 2 commits into
nextfrom
fix/release-merge-schedule-fallback

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

No new features

🐛 Bug Fixes

📦 Dependencies

No dependency updates

🔧 Other Changes

No other changes

👥 Contributors

An approval given before CI finishes relied entirely on `check_suite:
completed` to re-fire the merge check once the last one went green.
GitHub does not reliably deliver that event for an integration
branch's own check suite: CLDMV/slothlet#437 sat fully green and
approved for 20+ minutes with nothing re-triggering the merge job — no
check_suite-triggered run of release-merge.yml occurred at all despite
coverage finishing and the PR going green (#318).

Add a `schedule` cron trigger (every 10 minutes) alongside the
existing check_suite fast path. On a schedule event neither
`pr_number` nor `head_branch` are set, so action.mjs's existing
fallback resolution (scan open PRs for the release PR) already
handles it with no code changes — cheap when idle (a couple of GET
calls, then exit). check_suite stays as a best-effort fast path; the
cron is what actually guarantees convergence.

Applied to this repo's own local-release-merge.yml and the org-wide
caller template (examples/individual-repo-workflows/release-flow-v4/
release-merge.yml) so future adopters get it by default. Existing
adopters (currently just slothlet) need the same change applied to
their own copy of the caller — it isn't picked up via the @v4 pin
since the triggers live in the caller file each repo owns.
@cldmv-bot cldmv-bot Bot added ! fix → next v4 flow: fix contributor PR targeting the next integration branch type: ci Changes to CI workflows, actions, or build pipelines type: documentation Relates to docs, README updates, guides, or inline code comments labels Sep 21, 2026
… for #318

The previous commit added a schedule cron as a "guaranteed" fallback,
but that's the wrong tool: it's a wasteful always-on poll (every
consumer, every 10 minutes, forever) papering over the real mechanism
instead of fixing it, and still adds up to 10 minutes of latency in
the common case.

The actual cause of #318: GitHub does not deliver `check_suite:
completed` for a check suite created by GitHub Actions itself — which
is every check a repo's own ci.yml, coverage-badge, and PR-comment
jobs produce — only for one created by a third-party App. That's why
zero check_suite-triggered runs of release-merge.yml ever fired for
slothlet PR #437's own head branch: the trigger was silently dead for
the exact case it exists to handle. `workflow_run` is GitHub's
documented replacement for "re-run something when this other workflow
finishes" and doesn't have that restriction.

Replace `check_suite: completed` + `schedule` with `workflow_run`,
naming the caller's own ci.yml by its literal workflow name (required
— workflow_run matches on name, not filename, and can't be templated
via an expression in `on:`). Thread `workflow_run.head_branch` through
`workflow-release-merge.yml` as the primary source for the `head_branch`
input, falling back to `check_suite.head_branch` for a caller that
hasn't re-synced its template copy yet or genuinely has a third-party
App's check suite worth listening to. action.mjs's resolution logic is
unchanged — it already treats `head_branch` generically regardless of
which event produced it.

Applied to this repo's own local-release-merge.yml and the org-wide
caller template. Existing adopters (slothlet) get a follow-up commit
with the same change, for the same reason a caller-file trigger change
never arrives via the @v4 pin — see the previous commit's discussion.
@cldmv-bot cldmv-bot Bot added the area: core Touches core library / runtime source code label Sep 21, 2026
@Shinrai Shinrai changed the title fix(ci): guarantee release-merge re-evaluation with a scheduled fallback fix(ci): re-arm release-merge via workflow_run instead of check_suite Sep 21, 2026
@Shinrai
Shinrai merged commit f1d480f into next Sep 21, 2026
15 checks passed
@cldmv-bot
cldmv-bot Bot deleted the fix/release-merge-schedule-fallback branch September 21, 2026 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Touches core library / runtime source code ! fix → next v4 flow: fix contributor PR targeting the next integration branch type: ci Changes to CI workflows, actions, or build pipelines type: documentation Relates to docs, README updates, guides, or inline code comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant