release: retry post-publish latest-release verification after GitHub propagation delay
The v1.2.0 publish run (36408902410) passed Gates 0–4, created the draft, and flipped it public at 10:18:26Z. Its Post-publish verification step started one second later, queried /releases/latest, and exited 1 before printing either of its warnings, because GitHub had not yet converged on the new latest release. An independent check minutes later confirmed the release was correct: /releases/latest pointed to v1.2.0 and all three assets re-hashed to their published values.
A read-after-write check that fails on propagation delay makes a correct release look like a failed one, and invites an unnecessary re-publish.
Fix in .github/workflows/release-publish.yml:
- Retry only the read-only verification, with a bounded backoff of about 2/4/8/12 s after an immediate first attempt. Never loop forever.
- On each attempt, confirm that the release exists,
draft=false,prerelease=false, the expected assets are present, and/releases/latest.tag_nameequals the tag. - Tolerate a transient API error and retry it.
- On timeout, fail with a message that separates:
- (A) the release is missing or wrong;
- (B) the release is public but the latest pointer has not propagated.
- Never republish, retag, or replace assets from this step.
- Put the decision logic in a small helper with deterministic tests.
Root cause correction. Propagation delay is not what failed v1.2.0's step, and not what failed v1.0.0's (run 36212572597) or v1.1.0's (run 36284016422) either; all three failed the same way.
The step's re-hash loop walks every release asset, including SHA256SUMS itself, which sorts first. For that asset, want="$(grep " $name\$" dist/SHA256SUMS | awk ...)" finds no line, because a checksum file does not list itself. grep exits 1, and under set -euo pipefail the failed command substitution ends the step with exit 1 before any message is printed. That matches the log: exit 1, 0.9 s after start, no output.
Reproduced locally with the live SHA256SUMS: the same shell fragment exits 1 silently. Also confirmed read-only that /releases/latest is v1.2.0 and that the asset URL download via gh api works.
The fix in the linked PR:
- Verify the
SHA256SUMSasset byte-for-byte against the gateddist/SHA256SUMS. - Verify each binary against its own line, and fail loudly on any asset with no expected hash.
- Add the bounded retry for the latest-pointer read, which is still worth having.
- Move all decision logic into a tested helper.