From fa9dc14b82484cc159ffb2fea390c3ee7dfc24d6 Mon Sep 17 00:00:00 2001 From: Chris Wolfgang <210299580+Chris-Wolfgang@users.noreply.github.com> Date: Mon, 12 Oct 2026 13:35:19 -0400 Subject: [PATCH] ci(stryker): close the survivors issue when nothing survives The Track surviving mutants step only ever edited or created the kind:mutation-survives issue, so a run with zero survivors retitled it 'Mutation survivors (0)' and left it open indefinitely (#655). Now a zero-survivor run closes the open issue with a comment naming the run and score; the next run that finds a survivor opens a new one. Closes #655 Co-Authored-By: Claude Opus 5.5 --- .github/workflows/stryker.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/stryker.yaml b/.github/workflows/stryker.yaml index a155d8a8..4cff057c 100644 --- a/.github/workflows/stryker.yaml +++ b/.github/workflows/stryker.yaml @@ -317,6 +317,16 @@ jobs: "$GITHUB_RUN_ID" "$score" "${floors:-none}" "$survivors") existing=$(gh issue list --repo "$GITHUB_REPOSITORY" --label "kind:mutation-survives" \ --state open --json number --jq '.[0].number' 2>/dev/null || true) + # Nothing survived: the worklist is empty, so close the tracking issue instead of + # leaving a "Mutation survivors (0)" issue open forever. The next run that finds a + # survivor opens a fresh one. + if [ "$count" -eq 0 ]; then + if [ -n "$existing" ]; then + gh issue close "$existing" --repo "$GITHUB_REPOSITORY" \ + --comment "No surviving mutants in run $GITHUB_RUN_ID (lowest mutation score ${score} %). Closing; the next run that finds a survivor opens a new issue." || true + fi + exit 0 + fi if [ -n "$existing" ]; then gh issue edit "$existing" --repo "$GITHUB_REPOSITORY" --title "$title" --body "$body" || true else