diff --git a/.github/workflows/review-reviewers.yaml b/.github/workflows/review-reviewers.yaml index 6c0c2b1e..7f4e15f5 100644 --- a/.github/workflows/review-reviewers.yaml +++ b/.github/workflows/review-reviewers.yaml @@ -17,6 +17,10 @@ jobs: # legs find an existing issue instead of racing to create one. Without this, # the first cron tick of each new month produced N-1 duplicate tracking # issues (one per matrix leg that lost the find-or-create race). + # + # This is an optimisation, not a precondition: the skill still carries its own + # find-or-create fallback, so the matrix runs even when this job doesn't + # complete (see `if:` on the matrix job below). init-tracking: runs-on: ubuntu-24.04 environment: @@ -47,6 +51,11 @@ jobs: review-reviewers: needs: init-tracking + # Run even when init-tracking failed or never got a runner — losing the + # race guard costs up to N-1 duplicate tracking issues on the first tick of + # a month, while gating on it costs the whole analysis window for every + # target repo. Not `always()`: a user cancelling the run should stop here. + if: ${{ !cancelled() }} strategy: fail-fast: false matrix: diff --git a/plugins/tend-ci-runner/skills/review-reviewers/SKILL.md b/plugins/tend-ci-runner/skills/review-reviewers/SKILL.md index b9af0f82..55d3b18f 100644 --- a/plugins/tend-ci-runner/skills/review-reviewers/SKILL.md +++ b/plugins/tend-ci-runner/skills/review-reviewers/SKILL.md @@ -82,7 +82,7 @@ GIST_DESC="review-reviewers evidence: $TARGET $MONTH" The tracking issue lives on tend (the current repo). It indexes gists via one comment per new gist — no per-run comments, no body edits. -The workflow's `init-tracking` job runs before the matrix and creates the monthly tracking issue if absent, so matrix legs always find an existing one. The find-or-create logic below remains the fallback for ad-hoc invocations and as a safety net; sort lowest-numbered first in case a race ever does produce duplicates. `gh issue create` prints the new issue's URL; parse the number from its basename. +The workflow's `init-tracking` job runs before the matrix and creates the monthly tracking issue if absent, so on a normal tick matrix legs find an existing one. It is not a precondition — the matrix runs even when that job fails or never gets a runner, so the find-or-create logic below is a live code path on the first tick of a month, not only a fallback for ad-hoc invocations. Sort lowest-numbered first so a lost race degrades to a duplicate rather than a crash. `gh issue create` prints the new issue's URL; parse the number from its basename. ```bash TRACKING_NUMBER=$(gh issue list --state open --label "$TRACKING_LABEL" \