Repository navigation
ci shepherd: log every queued PR every pass; rerun a cancelled non-required check (#4790) - #4850
Merged
Merged
Conversation
…quired check (#4790) PR #4837 had only two CANCELLED `full-suite-matrix (macos-...)` legs. A shepherd pass ran and logged nothing about the PR and did nothing. Root cause: ci_digest split classify's `NAME (conclusion)` verdicts at the FIRST " (". A matrix leg's own name holds a " (", so `full-suite-matrix (macos-14) (cancelled)` became `full-suite-matrix`, which matched no run. digest() returned an empty `failed` list for the PR, the rerun loop had nothing to rerun, and no branch logged anything. Fix: - pr_check.failed_names(): cut the verdict at the LAST " ("; ci_digest uses it in digest() and main_failures(). - ci_shepherd: each queued PR is handled by _pass_one(), and step() adds a fallback line ("#N no action: head ..., mergeable_state ..., failed: ..., pending: ...") whenever it logs nothing. - A failed infra/flake check that is not rerun now logs why ("#N blocked: <check> (<triage>) -- no action: 1/3 reruns used; the next waits 15 min after the last", or "no run id"). Tests: a cancelled non-required matrix leg is rerun once with a log line, and a second pass inside RETRY_GAP logs a blocked line with no rerun. The first test fails on the old ci_digest. A behind PR whose branch was already updated logs its state. Co-Authored-By: Claude Haiku 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TBJdDBRtJis5hzE244NQKV
Contributor
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.
Closes nothing; follow-up to #4790.
Observed 2026-10-10 (PR #4837): its only failures were two CANCELLED
full-suite-matrix (macos-...)legs. A shepherd pass ran (state saved) and logged nothing about #4837 and did nothing.Root cause:
ci_digestsplit classify'sNAME (conclusion)verdicts at the first(. A matrix leg's name contains one, sofull-suite-matrix (macos-14) (cancelled)becamefull-suite-matrix, which matched no run.digest()returned no failed checks for the PR, so the rerun loop had nothing to do and no branch logged a line.Fix:
pr_check.failed_names()cuts at the last(;ci_digestuses it indigest()andmain_failures().ci_shepherd.step()hands each queued PR to_pass_one()and adds a fallback line whenever a PR logs nothing:#N no action: head ..., mergeable_state ..., failed: ..., pending: N.#N blocked: <check> (<triage>) -- no action: 1/3 reruns used; the next waits 15 min after the last(orno run id).The cancelled non-required check is rerun via
gh run rerun RUN --failedunder the existingretry_duepolicy (INFRA_RETRIES,RETRY_GAP) and is not changed otherwise.Tests (
tests/tools/test_ci_shepherd.py): a PR blocked only by a cancelled non-required matrix leg gets one rerun and a log line, and a second pass insideRETRY_GAPlogs a blocked line with no rerun. The first test fails on the oldci_digestand passes on the fix. A behind PR whose branch was already updated logs its state.Gates:
pyteston the touched tests (25+ passed),ruff format,ruff_audit --ciandmypy_audit --ciclean against baselines,pr_gates.py --fast5/5 via heavy-run.🤖 Generated with Claude Code
https://claude.ai/code/session_01TBJdDBRtJis5hzE244NQKV