From 6767cb24e7d894bcb8dcfcbbc48be047fd614d74 Mon Sep 17 00:00:00 2001 From: Markus Neusinger <2921697+MarkusNeusinger@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:33:37 +0200 Subject: [PATCH] fix(watchdog): skip cron-liveness rescue when daily-regen is disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The liveness check in section C treats a >10 h gap in daily-regen runs as a starved GitHub schedule and re-dispatches the workflow. A manually disabled daily-regen produces exactly that signature — its cron never ticks, so the gap grows without bound — but `gh workflow run` on a disabled workflow returns HTTP 422. Under `set -euo pipefail` that killed the whole scan step after sections A and B had already done their work, so every scan outside the quiet window reported failure (4 of the last 6 runs). Read the workflow's state before the rescue and skip with a notice unless it is `active`. A deliberate pause stays paused; genuine scheduler starvation on an active workflow is still rescued. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01RbZuWNDFy7kjXh9kLfA4dP --- .github/workflows/watchdog-stuck-jobs.yml | 11 ++++++++++- CHANGELOG.md | 6 ++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/watchdog-stuck-jobs.yml b/.github/workflows/watchdog-stuck-jobs.yml index 75ecdb5372..39d4577983 100644 --- a/.github/workflows/watchdog-stuck-jobs.yml +++ b/.github/workflows/watchdog-stuck-jobs.yml @@ -312,7 +312,16 @@ jobs: # CEST and sits an hour earlier in local terms under CET. LIVENESS_HOURS=10 HOUR=$(date -u +%-H) - if (( HOUR >= 17 && HOUR <= 21 )); then + # A manually disabled daily-regen is a deliberate pause (e.g. while a + # sequential backfill owns the rate limit), not a starved schedule: + # its cron does not tick at all, so the gap grows without bound, and + # `gh workflow run` on a disabled workflow fails with HTTP 422 — which + # under `set -e` takes the whole scan down after A and B already ran. + REGEN_STATE=$(gh api "repos/${GH_REPO}/actions/workflows/daily-regen.yml" \ + --jq '.state' 2>/dev/null || echo unknown) + if [[ "$REGEN_STATE" != "active" ]]; then + echo "::notice::daily-regen liveness: workflow state is '${REGEN_STATE}', not active — rescue skipped" + elif (( HOUR >= 17 && HOUR <= 21 )); then echo "::notice::daily-regen liveness: inside/adjacent to quiet window (UTC hour $HOUR) — check skipped" else # --branch main: schedule runs (and rescue dispatches) live on the diff --git a/CHANGELOG.md b/CHANGELOG.md index 81b7287026..a8c6aad67f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,12 @@ aggregate instead: an italic *Catalog* line at the end of the version section an ### Fixed +- **A disabled `daily-regen` no longer fails every watchdog scan** — the watchdog's + cron-liveness rescue read the growing silence of a manually disabled schedule as + starvation and tried to dispatch it; GitHub answers `workflow_dispatch` on a disabled + workflow with HTTP 422, so the scan step died under `set -e` after sections A and B had + already run, and the run reported failure. The rescue now checks the workflow's state + first and skips with a notice when it is not `active` (#10540). - **Image structured data carries the licensing fields Google recommends** — Search Console flagged every implementation page's `ImageObject` for missing `creator`, `copyrightNotice`, `creditText`, and `acquireLicensePage`. The bot-page JSON-LD now