From 229feb1f8f674c62fddf0a7e470f249b70cb450c Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 15 Oct 2026 21:02:04 +0000 Subject: [PATCH] ci: run the nightly canaries on a PR that edits them, so GitHub registers the workflow (#174) nightly-canaries.yml has been on main since #171 but GitHub never registered it: list_workflows does not show it, /actions/workflows/nightly-canaries.yml answers 404, workflow_dispatch fails and the 19:00 UTC schedule did not run. e2e.yml, not on main yet, is registered from its pull request runs. A pull_request trigger limited to changes of this file runs the canaries before an edit merges and registers the workflow. The report job, the only one with issues: write, never runs on a pull request. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013LrvuThKGaPX1uDwUiwmGQ --- .github/workflows/nightly-canaries.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nightly-canaries.yml b/.github/workflows/nightly-canaries.yml index d6e30024..3bc12002 100644 --- a/.github/workflows/nightly-canaries.yml +++ b/.github/workflows/nightly-canaries.yml @@ -1,14 +1,20 @@ name: nightly-canaries # Early warning for toolchain drift: the unit tests on Bun (latest stable) and the typecheck on typescript@next. -# Scheduled only, so a red canary never blocks a PR. On failure, one tracking issue (label `tooling`) is opened or -# updated; see the `report` job. +# Scheduled, so a red canary never blocks an ordinary PR. On a scheduled or manual failure, one tracking issue +# (label `tooling`) is opened or updated; see the `report` job. on: schedule: # 02:00 Asia/Ho_Chi_Minh (UTC+7) is 19:00 UTC the day before. - cron: '0 19 * * *' workflow_dispatch: + # Only a PR that edits this file: the edit is run before it merges. A file with only schedule and + # workflow_dispatch triggers was never registered by GitHub after #171 merged (no run, dispatch 404, #174); + # a pull request run registers it. + pull_request: + paths: + - .github/workflows/nightly-canaries.yml permissions: contents: read @@ -81,11 +87,12 @@ jobs: - name: Lockfile is unchanged run: git diff --exit-code -- pnpm-lock.yaml package.json - # The only job with a write permission and the only one that touches issues. It runs only when a canary failed. + # The only job with a write permission and the only one that touches issues. It runs only when a canary failed, + # and never on a pull request run (the PR shows the failure itself). report: name: Open or update the tracking issue needs: [bun-unit, typescript-next] - if: ${{ always() && (needs.bun-unit.result == 'failure' || needs.typescript-next.result == 'failure') }} + if: ${{ always() && github.event_name != 'pull_request' && (needs.bun-unit.result == 'failure' || needs.typescript-next.result == 'failure') }} runs-on: ubuntu-latest timeout-minutes: 5 permissions: