Repository navigation
shepherd-reconcile: a skipped completion takes no pass and cannot cancel a pending one (Part of #7455) - #7463
Merged
Merged
Conversation
…cel a pending one (Part of #7455) 27% of the completions that wake the workflow are skipped (a draft's heavy workflows). They now get a concurrency group of their own and no job, so they can no longer replace a real pending pass. A cancelled run took no runner (100 of 100 sampled had no job), so this is a small change: about a third fewer cancelled rows, the same passes, the same reaction time. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Owner
Author
|
Waiting on an owner decision (asked privately, 2026-11-01). Nothing is needed from contributors; work resumes once it is answered. |
Contributor
|
No description provided. |
Contributor
|
No description provided. |
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.
Part of #7455 (item 1). The owner approved editing
shepherd-reconcile.ymlin this PR.Why. 319 of the 500 most recent cancelled runs on 2026-11-01 were
CI shepherd (reconcile). I measured what they cost before changing anything: almost nothing. The change is minimal for that reason.Measured (2026-10-25..11-01, all 9,321 runs of the workflow).
pull_requestruns.What. A
skippedcompletion (a draft's heavy workflows) no longer takes a pass, and it gets a concurrency group of its own, so it cannot replace a real pending pass. Every other completion, the cron and manual runs stay in the shared group. Cancelled completions keep their pass: 15 of the 196 had no newer run, and those are what the shepherd reruns.Effect (replay of the 2026-10-31 completions with that day's real pass durations; the replay gives 1,399 cancelled and 260 passes, the real day had 1,440 and 276).
So there are about a third fewer cancelled rows, and the reaction time does not move. API calls barely move either, because a cancelled run never made any: reducing them means fewer real passes, and coalescing already limits those. I did not add a debounce, which would hold a runner idle to save seconds of work.
No lost pass. Before this, a skipped completion could replace a real pending pass and then do nothing itself. That can no longer happen. None of the 455 skipped completions was the last word on its head: each had a later real completion on the same head, and the next real completion anywhere came 34 s later at the median, 404 s at most.
Verified.
tests/tools/test_shepherd_gh.py,test_shepherd_markers_not_hand_written.pyandtest_workflow_draft_gate.py: 214 passed.ruff_audit --ciandmypy_audit --ci: no new findings. The workflow parses as YAML and a new test pins the group and theif.Not verified. The group expression has not run on GitHub: a
workflow_runworkflow runs from main, so it only takes effect after merge. Check after merge that skipped runs show asskippedand the cancelled share falls.actionlintis not installed here.🤖 Generated with Claude Code