Skip to content

fix(changelog): make scheduled draft run idempotent instead of time-gated - #52

Merged
nibzard merged 1 commit into
mainfrom
fix/changelog-draft-idempotent-gate
Jun 6, 2026
Merged

fix(changelog): make scheduled draft run idempotent instead of time-gated#52
nibzard merged 1 commit into
mainfrom
fix/changelog-draft-idempotent-gate

Conversation

@nibzard

@nibzard nibzard commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Problem

The Changelog Draft workflow gated scheduled runs to hour == "09" Toronto. That window is only 1 hour wide, but GitHub's scheduler routinely delays cron triggers 30–60+ min. When delayed past the window the run lands in hour 10 and silently skips.

This week (run 27022421686 and its sibling at 14:01 UTC) both skipped — the 0 13 cron was delayed to 14:01 UTC = 10:01 Toronto — so no changelog was generated. 05-29 hit the same issue (PR #44 was a manual dispatch, not the schedule).

Fix

Replace the wall-clock gate with an idempotency check: a scheduled run skips only if a draft changelog PR (automation/changelog-*) is already open. gh pr list hits the API, so no checkout is needed and the skip path stays cheap.

  • Immune to scheduler jitter — no dependence on execution time.
  • Both Friday crons now act as redundancy: whichever fires first does the work, the other skips.
  • Manual workflow_dispatch still always runs.

…ated

The 9 AM Toronto wall-clock gate required the run to execute in a 1-hour
window, but GitHub's scheduler routinely delays cron triggers by 30-60+
minutes. Delayed runs landed outside the window and silently skipped, so
some Fridays produced no changelog at all.

Replace the time gate with an idempotency check: a scheduled run skips
only when a draft changelog PR is already open. Both Friday crons now act
as redundancy (whichever fires first does the work) and the job no longer
depends on wall-clock execution time.
@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jun 6, 2026 7:20am

Request Review

@nibzard
nibzard merged commit a1bd0f5 into main Jun 6, 2026
2 of 3 checks passed
@nibzard
nibzard deleted the fix/changelog-draft-idempotent-gate branch June 6, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant