beads/.github
Jim Wordelman 9c8be5e85f
ci: retry the module fetch in pr-policy-wrapper, not the build (#5901)
* ci: retry the module fetch in pr-policy-wrapper, not the build

PR Policy (wrapper timing) is a required check, and it is the one job in
pr.yml that can be failed by someone else's network. setup-go runs with
cache: false, so every run pulls the entire module graph from
proxy.golang.org, and nothing retries. A single proxy blip fails the check
outright.

Observed on a docs-only PR (one markdown file, +18/-0): the job died inside
a ~12s proxy.golang.org outage with

  stream error: stream ID NNN; INTERNAL_ERROR; received from peer

while 40 other jobs on the same commit, triggered at the same instant, built
the same module graph and passed. The split was by clock, not by content --
nothing about the change could have caused it.

Fetch the modules in their own retried step before the wrapper runs. With
the cache warm, the go build inside scripts/ci/pr-policy.sh compiles without
touching the network and stays unwrapped: a compile error still fails on the
first attempt rather than taking three, and an exhausted retry reports the
fetch as the cause instead of presenting a module outage as a build failure.

The loop mirrors the bounded apt-get steps in migration-test.yml and
release.yml: three attempts, a per-attempt timeout, a fixed backoff with none
after the last, and a step-level timeout-minutes above the resulting worst
case.

* ci: retry the module fetch in main.yml's pr-policy-wrapper too

pr.yml and main.yml carry byte-identical `pr-policy-wrapper` jobs. The
retry added in the previous commit covered only the pr.yml copy, so the
same unretried cold fetch stayed on the main-branch trigger — the job
this PR names is fixed in one workflow and not the other.

Mirrors the pr.yml step exactly: retries the fetch, never the build, and
fails load-bearing while naming the fetch so a module outage is not
reported as a build failure.

This is not a cache step, so the enumerated cache topology pinned by
TestGoCacheOwnershipTopology (scripts/ci_workflow_test.go) is untouched;
`go test ./scripts/` and actionlint are clean.

---------

Co-authored-by: Gas City Adopt-PR <adopt-pr@gascity.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 07:11:35 -07:00
..
actions/setup-bazel ci(bazel): advisory Bazel workflow + go test/Bazel equivalence check (#6881) 2026-09-27 23:05:21 -07:00
images Prepare for public launch: comprehensive examples, docs, and tooling 2025-10-12 11:25:29 -07:00
pages-redirect docs: redirect legacy GitHub Pages site to Mintlify (#4759) 2026-07-13 14:19:13 -07:00
scripts ci: gate PRs on the Bazel lanes, alongside the legacy jobs (D1) (#6941) 2026-09-29 03:33:20 -07:00
workflows ci: retry the module fetch in pr-policy-wrapper, not the build (#5901) 2026-09-30 07:11:35 -07:00
CODEOWNERS chore: purge deleted docs-pipeline references from release tooling, CI, and repo plumbing 2026-07-12 11:07:26 -07:00
copilot-instructions.md docs(lint): align contributor guidance with CI (saa-90w) (#5317) 2026-08-07 05:37:12 -07:00
dependabot.yml ci(dependabot): group version bumps per ecosystem (#5038) 2026-07-25 16:06:16 -07:00
PULL_REQUEST_TEMPLATE.md docs: add lightweight PR description template (#3750) 2026-05-06 12:32:16 -07:00