You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(devx): retry the lychee binary download and say when the link check did not run (#8253)
`Check Documentation Links` went red three times on 2026-08-12 without
examining a single link. lychee-action@v2's `lychee-setup` step fetches the
release tarball with a bare `curl -sfLO` -- no retry -- and when that one
request loses, curl exits 22, the action's `Install lychee` and `Run Lychee`
steps both report `skipped`, and the job fails in ~9 seconds. All three job
logs read directly, byte-identical in shape:
#8128 17:23:49Z run 31622391000 job 94200196323 exit 22, 497ms
#8205 20:08:47Z run 31636151516 job 94246838620 exit 22, 177ms
#8225 21:21:28Z run 31642129140 job 94266966755 exit 22
Transient, not systemic: each cleared on the next attempt, and a sibling PR
went green six minutes after the last failure.
Three changes, none of them a weakening -- `fail: true` stays on every path
and a retry that exhausts still fails the job.
Retry. The action is invoked twice: attempt 1 defers its verdict via
`continue-on-error`, a 15s wait follows, then an identical retry that carries
no such escape. A back-to-back retry would retry inside the same blip; every
observed recovery was tens of seconds to tens of minutes later. Zero cost on a
green run -- all three added steps are `skipped` when attempt 1 passes.
Legibility. A new step distinguishes "links are broken" from "the link check
never ran" and says so in the job summary and as an error annotation. The
discriminator is exact, not heuristic: the action's entrypoint.sh writes
`exit_code` to $GITHUB_OUTPUT *before* it exits, so a genuine broken-link
failure carries a value while a setup failure skips `Run Lychee` and leaves it
unset. It exits 1 on its own so the case stays red even if someone later makes
the retry lenient.
Version pin. Three comments in this file reasoned about "the pinned lychee
0.24.2" -- the `--offline` argument turns on which version runs -- but nothing
here pinned it; the version came from the action's own default, which moves
when the `v2` tag moves. `lycheeVersion: v0.24.2` asserts at the invocation
site what `--offline` already depends on.
The argv moves to a job-level `env` so the two invocations cannot drift.
Verified byte-identical to origin/main's inline args by parsing both.
Caching (the card's shape 1) is NOT included, on measurement: the action
`rm -rf`s its download directory and re-downloads unconditionally, so
`actions/cache` cannot reach it -- a cache step here would read as coverage
while doing nothing.
Part of #8238
Claude-Session: https://claude.ai/code/session_01BytmXbyC9R2Wvpg2uW14fc
Co-authored-by: Claude <noreply@anthropic.com>
echo "\`lychee\` was never executed, so **no link in this repository was"
194
+
echo "examined** — this red says nothing about the documentation links,"
195
+
echo "and nothing about the files this PR touches."
196
+
echo
197
+
echo "Both attempts failed while \`lycheeverse/lychee-action@v2\` was"
198
+
echo "downloading the \`${LYCHEE_VERSION}\` binary from the GitHub releases"
199
+
echo "CDN (\`curl\` exit 22). This is a known transient failure (#8238);"
200
+
echo "re-running the job is the expected remedy."
201
+
echo
202
+
echo "The gate remains fail-closed on purpose: a link check that could"
203
+
echo "not run must not report success."
204
+
} >> "$GITHUB_STEP_SUMMARY"
205
+
echo "::error title=Link check did not run::lychee setup failed twice (binary download, curl exit 22). No links were checked — see #8238. Re-run the job."
206
+
# Fail-closed, asserted here rather than inherited. The retry step has
207
+
# already failed the job, so this `exit 1` is redundant today -- and
208
+
# deliberately so: if anyone ever adds `continue-on-error` to the
209
+
# retry, the "did not run" case must still be red, not a vacuous
0 commit comments