[skill] Correct babysit-pr-to-pass-ci on the pr-gate cooldown - #35633
Closed
michaelzhang-ai wants to merge 1 commit into
Closed
michaelzhang-ai wants to merge 1 commit into
michaelzhang-ai wants to merge 1 commit into
Conversation
Babysitting two AMD PRs through pr-gate turned up guidance in this skill that is actively counterproductive, plus a few gaps worth closing. The cooldown advice said to wait it out. Waiting does not work: pr-gate rate-limits on triggering_actor, agent pushes share one bot identity so unrelated agents consume the same budget, and a gate-blocked run still counts against the window because pr-test.yml's notify-pr-states job runs always(), succeeds, and is absent from pr-gate's gateJobs exclusion list. Each blocked push therefore renews the window and retry-by-push cannot converge. A rerun is the escape hatch, since its triggering_actor is github-actions[bot], which pr-gate substitutes with the PR author. That also needs an exception to the blanket ban on full-run reruns: a gate-blocked run leaves its downstream jobs skipped rather than failed, so --failed has nothing to resurrect and the whole run must be rerun. Preflight now checks that the credentials can rerun at all, since a read-only default token makes the skill's main lever fail silently. Also: re-read PR state and mergedAt each cycle, because polling checks alone let a merged PR look like it is still one cycle from green; treat cancelled as 'never reported' rather than as a retryable failure; verify a workflow actually has a pull_request trigger before waiting on a run that can never appear, and note that nightly-registered tests are unreachable from a PR; and establish 'pre-existing on main' by diffing failing cases against the same workflow on the base branch, comparing cases rather than partition indices. Co-authored-by: quitenode <quitenode@users.noreply.github.com>
alexnails
restored the
cursor/babysit-ci-skill-cooldown-lessons-d1f1
branch
September 14, 2026 05:40
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.
Motivation
Babysitting #34481 and #34485 through
pr-gatefor about a week surfaced one piece of guidance in this skill that is actively counterproductive, plus a few gaps that cost real time. Everything below is checked against the currentpr-gate.yml/pr-test.ymlrather than recalled.The cooldown advice was wrong. The skill said to wait out the cooldown rather than burn retries. Waiting does not work, for two compounding reasons:
pr-gaterate-limits on the run'striggering_actorand exempts anyone with write access, so the outcome turns on identity rather than on the PR. Agent pushes share one bot identity, so unrelated agents pushing to the same repository consume the same one-run-per-120-minutes budget. A window verified clear can be taken seconds later — that happened twice.pr-gatetries to discount such runs (didRunPassGate), but its exclusion list is['check-changes', 'pr-gate', 'call-gate', 'pr-test-finish']andpr-test.yml'snotify-pr-statesjob is not in it. That job isif: always()and succeeds, so a run that never got past the gate reads as having consumed CI. Each blocked push therefore renews its own window: retry-by-push cannot converge. Observed directly — a blocked push at 05:48 moved the next opportunity to 07:48.The escape hatch is a rerun, not a push: a rerun's
triggering_actorisgithub-actions[bot], whichpr-gatesubstitutes with the PR author, so a write-access author clears the gate immediately. That is what finally unblocked both PRs after six days.Modifications
Six surgical edits, +15/-5 lines in
SKILL.md:skipped, notfailed, so--failedhas nothing to resurrect and the whole run must be rerun. Without this the skill forbids its own escape hatch.gh run rerunfail; check the run's injected secrets for one withrepo+workflowscope, verify the account viagh api userand thex-oauth-scopesheader, and never print the value.state/mergedAteach cycle, not just its checks. [AMD] Let the diffusion AITer backend take grouped-query K/V (fix Cosmos3-Nano startup) #34485 was reported as "one CI cycle away" when it had been merged eleven hours earlier, becausegh pr checkssays nothing about merge state. Also: treatcancelledas "never reported" rather than a retryable failure, since a merge or superseding push cancels in-flight runs.pull_requesttrigger at all (pr-test-amd.ymlis now a daily ROCm 7.0 shadow; the PR gate ispr-test-amd-rocm720.yml), which makes selecting it unsatisfiable. Phrased so it stays true as that ownership drifts. Also note nightly-registered tests are unreachable from any PR run.Accuracy Tests
Documentation only — no runtime code touched, so there is nothing to test at runtime. The factual claims were verified against the workflows on
mainrather than from memory:gateJobsatpr-gate.yml:202omitsnotify-pr-states; that job exists atpr-test.yml:561withalways(); thegithub-actions[bot]-> PR-author substitution is atpr-gate.yml:93-99; andhasHighPermissionshort-circuits the limit atpr-gate.yml:112. Also checked the file still parses as a valid skill (frontmatter intact, ordered-list numbering consistent, no broken relative links).Speed Tests and Profiling
Not applicable.
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ✅ Run #32331298661
Latest PR Test (Extra): ❌ Run #32331298457