Smoke test: run weekly and open an issue on failure - #270
Merged
Conversation
The existing `workflow_run` trigger only fires after releases of *this* repo, so it never catches changes underneath us -- a new coverage-reporter release, a runner-image update, or a Homebrew change. Those are precisely the drifts that break the end-user install chain silently. Concrete example: coverage-reporter v0.6.18 shipped tonight and nothing here fired. Verifying it required remembering this workflow existed and dispatching it by hand, which is exactly the kind of step that gets skipped. Adds a weekly cron as a safety net. The job's existing `if:` guard already passes for schedule events (`github.event_name` is 'schedule', so the workflow_run conclusion check is short-circuited), so no other change needed. Chose a weekly schedule over wiring a `repository_dispatch` from coverage-reporter's build.yml: cross-repo dispatch cannot use `secrets.GITHUB_TOKEN` and would require creating, storing, and rotating a PAT. A schedule needs no credentials and additionally covers drift that no coverage-reporter release would trigger -- which is where two of tonight's three breakages actually came from. Cron is set off the hour to avoid GitHub's peak-of-hour scheduling delays. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Email is a weak alarm for a scheduled job. GitHub sends scheduled-run failure
notifications only to whoever last edited the cron expression -- not to repo
watchers -- and if that person's notification settings are wrong, the failure
is silent. We would have automated the check without automating the alert,
which is worse than not automating it: it looks watched when it is not.
Adds a `report-failure` job that opens an issue when any smoke matrix job
fails. Visible, persistent, and independent of anyone's inbox configuration.
Details:
- Reuses the existing open issue (via the `smoke-test-failure` label) and
comments on it, so a recurring weekly failure does not open 52 issues.
- Creates the label on first use, so no manual setup is required.
- Scoped `permissions: issues: write` on the job rather than the workflow.
- The issue body explains what the failure implies (end users are likely
broken right now, even though nothing in this repo changed) and lists the
usual causes, so whoever picks it up has context rather than a bare link.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Problem
smoke-test.ymlverifies the full end-user chain of the published@v2across all four platforms. It's the right test — but it only runs when someone remembers to run it, and if it fails there's no reliable alarm.The existing
workflow_runtrigger fires after releases of this repo. It never fires for changes underneath us:macos-latestmoving from Sequoia to Tahoe)Concrete example: coverage-reporter v0.6.18 shipped and nothing here fired. Verifying that end users would actually get it required remembering this workflow existed and dispatching it by hand. The header comment already says to run it manually after "a Homebrew major version, a runner-image update, or an action update" — and it still didn't happen until someone thought to ask.
Changes
1. Weekly schedule
The job's existing guard already passes for schedule events (
github.event_nameis'schedule', so theworkflow_runconclusion check short-circuits). Cron is deliberately off the hour; GitHub delays scheduled jobs that pile up at:00.2. Open an issue on failure
A
report-failurejob (needs: smoke,if: failure()) that opens an issue when any matrix job fails.Email is a weak alarm for a scheduled job: GitHub sends scheduled-run failure notifications only to whoever last edited the cron expression — not to repo watchers — and if that person's notification settings are wrong, the failure is silent. Adding a schedule without an alarm would automate the check but not the alert, which is worse than not automating it: it looks watched when it isn't.
smoke-test-failurelabel and comments on it, so a recurring weekly failure doesn't open 52 issues.permissions: issues: writeon the job, not the workflow.Also updated the header comment so the docs match the triggers.
Why not
repository_dispatchfrom coverage-reporter?That was the alternative — fire immediately when a reporter release completes. Rejected because:
secrets.GITHUB_TOKENcannot dispatch cross-repo, so it needs a PAT withreposcope created, stored, and rotated — a new long-lived credential added to the release path we're trying to make more robust.Verification
needs/if/permissions.run:block was extracted and checked withbash -nto confirm the heredoc terminates correctly after YAML strips block indentation.Note
GitHub auto-disables scheduled workflows after 60 days of repository inactivity. This repo is active enough that it shouldn't trigger, but the failure mode is "silently stops running" rather than "fails loudly" — worth knowing that absence of alerts isn't proof it ran.
🤖 Generated with Claude Code