ci: retry the woke download so a CDN reset cannot fail the gate - #4965
Conversation
The Inclusive Language job downloads the woke binary with a bare `curl -sSfL` and no retry flags, so a single transient connection reset from the GitHub Releases CDN (curl exit 35) fails the check closed before the scanner ever runs. Every PR rolls that dice, and a fork contributor cannot re-run the job alone -- re-running requires admin rights, so the only contributor-side remedy is an empty amend that discards every other completed check and re-queues the whole pipeline. Add `--retry 3 --retry-delay 2 --retry-all-errors`, matching the convention already used for release-artifact downloads in publish-linux.yml, publish-windows.yml, publish-cli.yml and sign-and-notarize.yml. `--retry-all-errors` is the load-bearing flag: a bare `--retry` covers transient HTTP statuses and timeouts but not a mid-transfer reset. The existing sha256sum verification is untouched, so a truncated or substituted download still fails loudly rather than being retried into a bad binary. Extend the existing woke install-step test with a ratchet asserting the retry flags and the surviving checksum gate.
Design Review (Fable 5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Root-cause fix for a real fail-closed flake, matching the repo's existing curl-retry convention, with the checksum gate preserved and ratchet-tested. [DESIGN-REVIEWED] 003638e |
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
First Principles Review (Fable 5, fork) — ✅ PASSPremise-level review of Reading the contract, intent, and patch is done; I judged the change against the base tree. Final review: First-Principles-Verdict: PASS A one-line retry fix for a reported CI failure (#4961), aimed at the exact curl exit-35 cause, with no riders that add surface. What this change shipsIntent: stop a transient CDN reset from red-lighting a required PR check whose scanner never ran — a FIX.
Counts run: [FIRST-PRINCIPLES-REVIEWED] 003638e |
Base branch was modified
…dotdev#4965) The Inclusive Language job downloads the woke binary with a bare `curl -sSfL` and no retry flags, so a single transient connection reset from the GitHub Releases CDN (curl exit 35) fails the check closed before the scanner ever runs. Every PR rolls that dice, and a fork contributor cannot re-run the job alone -- re-running requires admin rights, so the only contributor-side remedy is an empty amend that discards every other completed check and re-queues the whole pipeline. Add `--retry 3 --retry-delay 2 --retry-all-errors`, matching the convention already used for release-artifact downloads in publish-linux.yml, publish-windows.yml, publish-cli.yml and sign-and-notarize.yml. `--retry-all-errors` is the load-bearing flag: a bare `--retry` covers transient HTTP statuses and timeouts but not a mid-transfer reset. The existing sha256sum verification is untouched, so a truncated or substituted download still fails loudly rather than being retried into a bad binary. Extend the existing woke install-step test with a ratchet asserting the retry flags and the surviving checksum gate.
Problem / Motivation
The
Inclusive Languagecheck failed on a PR whose entire diff was one line (layout="side"), containing no flagged terms at all. The scanner never ran — the job died 140ms into the step that downloads thewokebinary:curl: (35)is a TLS-layer connection reset from the GitHub Releases CDN. Nothing about it relates to the PR's contents.Why it matters
POST /actions/jobs/<id>/rerun→403 Must have admin rights to Repository). The only contributor-side remedy is an empty amend + force-push, which throws away every other check that already completed in that run and re-queues the entire pipeline.--retry/--retry-delayguard the curl downloads inpublish-linux.yml,publish-windows.yml,publish-cli.yml,sign-and-notarize.ymlandship-report.yml. The woke download is the lone outlier.What changed (motivation → approach → change)
Symptom: a required check fails with no findings and no scanner output. Root cause:
.github/workflows/code-review.ymlfetches the woke release asset with a barecurl -sSfLand no retry flags, so a single transient reset fails the gate closed.The change adds the retry flags already conventional in this repo's other release-artifact downloads:
--retry-all-errorsis the load-bearing flag rather than a stylistic addition: a bare--retrycovers transient HTTP statuses and timeouts but not a mid-transfer connection reset, which is exactly the exit-35 failure observed. Retries stay bounded at 3 attempts, and-fstill fails on HTTP errors.The integrity gate is deliberately untouched. The existing
printf '%s %s\n' "$WOKE_SHA256" "$archive" | sha256sum -c -on the very next line still verifies the payload, so a truncated or substituted download fails loudly instead of being silently retried into a bad binary.Tests
test/test_github_workflow_security.pyalready asserted the install step's pinning and checksum properties. This extracts the shared step-slicing into a_woke_install_step()helper and addstest_woke_download_retries_transient_cdn_failures, which locks in:sha256sum -c -survives alongside the retry, so the ratchet fails if someone ever trades integrity verification for resilience.Verified the test actually catches the bug: with the workflow hunk reverted to
mainand the test kept,test_woke_download_retries_transient_cdn_failuresfails onassert "--retry 3" in install_step; with the fix applied it passes.Manual verification
N/A — unit coverage sufficient. The changed surface is a declarative curl invocation whose properties the ratchet test asserts directly; the transient CDN reset that triggered the bug is not reproducible on demand. Local gates run green: 172 tests pass across
test_github_workflow_security.py,test_workflow_permissions.py,test_ci_surface_tests.pyandtest_ai_review_workflows.py;isortandflake8clean; the workflow YAML parses.Screenshots / video
Why no screenshot: CI workflow and test-only change — no user-visible surface is touched, so there is no rendered delta to capture.
Related Issues
Fixes #4961
Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)Note for the maintainer: this diff necessarily touches
.github/, so the auto-approval bot will not grant workflow approval — each push needs a manual "Approve and run". That is inherent to the fix, since the bug is in a workflow file.