Repository navigation
fix(pr-pipeline): resend pr-merge dispatches on a TLS handshake timeout and retry the rerun and alert POSTs - #10266
Conversation
…ut and retry the rerun and alert POSTs Both full-run dispatch loops also resend on Go's `net/http: TLS handshake timeout`, which fails before the request is written; a rate limit still stops the step red. The rerun-failed-jobs POST and the post-merge-demotion-alert dispatch take the same Q677 retry (at most three attempts, capped full-jitter backoff, only for a request that never left); a rate-limited alert send stops red. The exhausted-retry warning now says the scheduled pickup re-dispatches only lane merges. Tests quote gh's rate-limit stderr as run 39906176584 logged it. Closes #9355 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-review reviewed No findings. I read the full diff, the PR context and the changed regions of Closing issue #9355, each criterion checked against the diff:
Shell logic. Changelog fragments. Patch for pr-pipeline and none for the test-only source-control change both fit the diff. No plugin manifests changed, so no Spend. The change adds up to 30 s of retry waits per step inside existing job timeouts and WAIT_CAP budgets. That is runner time and API calls only, so there is no hold. |
|
claude-security-review reviewed No security issues found in this change. critical-findings: 0 What I read: the whole diff (7 files) and PR context. For Trust controls: none of the control classes is touched.
Logic checked in the new retry loops:
Tests and changelog: the other files are test-only (stubbed gh) and changelog fragments. They carry a captured GitHub rate-limit message with a request ID and timestamp, which is not sensitive. Spend: the extra retry waits (up to 30 s per job) spend only Actions time already within the existing budget, which the diff's comments re-count. They use no paid plan or billing setting, so there is no hold. |
Brings in #10266 (pr-merge dispatch and POST retries); merged cleanly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #9355
Summary
Four follow-ups to pr-merge.yml's dispatch retry and the rate-limit tests, deferred from review of #9350 and #9354.
test_rate_limited_is_a_429_or_a_403_that_names_a_rate_limitintest_babysit_gh.py, andgh_rate_limiteditself were removed by #9456. The capture now feeds the tests that judge stderr alone: the full-run wait and the alert send inworkflow.test.mjs, the re-run step inmerge-job.test.mjs,test_babysit_postmerge.py's role-label read andtest_babysit_verify_evidence.py's not-transient list. No capture of a secondary limit, a bare 429 or a GraphQL limit was found, so those strings stay hand-written.net/http: TLS handshake timeout. That error comes before the request is written, so a resend cannot start a second run. The rate-limit stops from #9920 run before the resend check: a 403 or 429 still stops the step red and is never sent again.rerun-failed-jobsPOST and the post-merge-demotion-alert dispatch POST now get the Q677 retry. fix(source-control): stop babysit GitHub calls once a rate-limit pool is exhausted #9920 already sent the re-run POST throughapi_budget_wrap_gh, but that wrapper only stops on a rate limit and never retries. The alert POST had neither a retry nor a rate-limit stop.Fix
.github/workflows/pr-merge.yml:dial tcp|tls: (handshake|first record)|net/http: TLS handshake timeout, in both dispatch loops, the re-run POST and the alert send.stoppedcheck runs before any resend.workflow.test.mjs: a TLS handshake timeout is resent, in both jobs. A rate limit after the timeout still stops after two POSTs. The warning's new wording. The alert send's retry, its three-attempt cap, its rate-limit stop and no resend after a 502.merge-job.test.mjs: the re-run POST's retry, its cap and no resend after a refusal. A rate limit after an unsent POST stops red.pr-pipeline(patch) andsource-control(none: test strings only).Verification
pr-merge.yml. After it, all pass.node --test .github/scripts/pr-merge/*.test.mjs: 421 pass, 0 fail.node --test .github/actions/log-api-budget/*.test.mjs: 102 pass, 0 fail.python3 -m unittest discover -s tests -t .): 3043 tests OK.scripts/run-ruff.sh checkandformat --checkon the touched Python: clean.actionlint .github/workflows/pr-merge.yml: clean.scripts/check-affected.sh --tests: 13 passed, 1 skipped.Left out: a live run of the changed steps against GitHub (no TLS timeout or rate limit can be produced on demand); the stubbed-gh tests cover them.
Related
🤖 Generated with Claude Code