The build failure in run #7 / job #14 (as well as runs #5, #6, and #8 — starting before PR #2) was not caused by PR #2's pak/launch.sh changes. Both the test job and the Rust aarch64-unknown-linux-musl compilation succeeded in every run.
Instead, build-pak.sh failed while downloading minui-list / minui-presenter from GitHub Releases:
curl: (22) The requested URL returned error: 618
GitHub /releases/download/... endpoints respond with a 302 redirect to release-assets.githubusercontent.com containing a short-lived (5-minute) signed jwt. When an intermediate HTTP cache/proxy serves a cached 302 response after that 5-minute window expires (even when Cache-Control: no-cache is sent), release-assets.githubusercontent.com immediately rejects the request with HTTP 618 (jwt:expired), causing curl -fsSL to exit with code 22.
Changes
Updated download_if_missing() in build-pak.sh to:
Append a unique cache-busting query parameter (cb=<epoch>-<pid>-<random>-<attempt>) per attempt so every request bypasses stale cached 302 redirects and receives a fresh signed JWT.
Retry up to 5 times with backoff and explicit connect/max timeouts (--connect-timeout 15 --max-time 120).
Download to a temporary file and atomically move into place only after verifying the download succeeded and is non-empty.
Log <platform>/<binary> (e.g. tg5040/minui-list) for clearer CI output.
## Root Cause
The build failure in [run #7 / job #14](https://code.ryujin.dev/ryujin/romm-companion-nextui/actions/runs/7/jobs/14) (as well as runs #5, #6, and #8 — starting before PR #2) was **not** caused by PR #2's `pak/launch.sh` changes. Both the `test` job and the Rust `aarch64-unknown-linux-musl` compilation succeeded in every run.
Instead, `build-pak.sh` failed while downloading `minui-list` / `minui-presenter` from GitHub Releases:
```
curl: (22) The requested URL returned error: 618
```
GitHub `/releases/download/...` endpoints respond with a `302` redirect to `release-assets.githubusercontent.com` containing a short-lived (5-minute) signed `jwt`. When an intermediate HTTP cache/proxy serves a cached `302` response after that 5-minute window expires (even when `Cache-Control: no-cache` is sent), `release-assets.githubusercontent.com` immediately rejects the request with HTTP `618` (`jwt:expired`), causing `curl -fsSL` to exit with code 22.
## Changes
- Updated `download_if_missing()` in `build-pak.sh` to:
- Append a unique cache-busting query parameter (`cb=<epoch>-<pid>-<random>-<attempt>`) per attempt so every request bypasses stale cached `302` redirects and receives a fresh signed JWT.
- Retry up to 5 times with backoff and explicit connect/max timeouts (`--connect-timeout 15 --max-time 120`).
- Download to a temporary file and atomically move into place only after verifying the download succeeded and is non-empty.
- Log `<platform>/<binary>` (e.g. `tg5040/minui-list`) for clearer CI output.
Fixes #3
GitHub /releases/download/ URLs return a 302 redirect to
release-assets.githubusercontent.com with a 5-minute signed JWT.
When an intermediate HTTP cache/proxy caches that 302 response past the
JWT expiration (ignoring Cache-Control: no-cache), curl immediately fails
with exit code 22 (HTTP 618 jwt:expired).
- Append a unique cache-busting query parameter per attempt in
download_if_missing() so each request receives a fresh 302 redirect
and unexpired JWT
- Add retry logic with backoff, explicit timeouts, and atomic temp-file
writes so transient download failures do not break CI or leave partial
binaries behind
- Log platform/binary name (e.g. tg5040/minui-list) for clearer CI logs
Fixes#3
ryujin
merged commit 640061db21 into main2026-12-01 14:26:01 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Root Cause
The build failure in run #7 / job #14 (as well as runs #5, #6, and #8 — starting before PR #2) was not caused by PR #2's
pak/launch.shchanges. Both thetestjob and the Rustaarch64-unknown-linux-muslcompilation succeeded in every run.Instead,
build-pak.shfailed while downloadingminui-list/minui-presenterfrom GitHub Releases:GitHub
/releases/download/...endpoints respond with a302redirect torelease-assets.githubusercontent.comcontaining a short-lived (5-minute) signedjwt. When an intermediate HTTP cache/proxy serves a cached302response after that 5-minute window expires (even whenCache-Control: no-cacheis sent),release-assets.githubusercontent.comimmediately rejects the request with HTTP618(jwt:expired), causingcurl -fsSLto exit with code 22.Changes
download_if_missing()inbuild-pak.shto:cb=<epoch>-<pid>-<random>-<attempt>) per attempt so every request bypasses stale cached302redirects and receives a fresh signed JWT.--connect-timeout 15 --max-time 120).<platform>/<binary>(e.g.tg5040/minui-list) for clearer CI output.Fixes #3