Skip to content

fix(ci): retry artifact listing pages GitHub fails transiently - #4812

Merged
dr-bonez merged 1 commit into
masterfrom
fix/artifact-listing-retry
Nov 20, 2026
Merged

dr-bonez merged 1 commit into
masterfrom
fix/artifact-listing-retry

Conversation

@helix-red

@helix-red helix-red commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Every alpha apt publication since #4795 has failed: runs 44603974654, 44608010099 and 44616076376 each stop with unexpected end of JSON input. Until this merges, no product's alpha apt package updates.

Cause: GitHub intermittently answers the repository artifacts listing (GET /repos/…/actions/artifacts) with an HTTP 500 and an empty body. I reproduced it against the live API: identical requests flip between 500 and 200, at any page size. It is not a page-size or pagination limit. #4795 replaced the exact-name artifact filter with glob discovery. gha-artifact-run-ids.sh now reads about 110 pages of the listing per lookup, and any one of them failing kills the whole lookup.

Fix: each listing page retries up to five times, waiting 5, 10, 15 and 20 seconds between attempts, before discovery fails.

  • Failures: a persistent failure still fails the lookup, as before.
  • Cost: the most a single page can add is 50 seconds of waiting and four extra requests. A retry spends requests against the workflow token's 1000/hour limit only when GitHub has already failed one.
  • Other callers: gha-image-run.sh (make start-os-update-from-gha) uses the same discovery, so it gets the retry too.
  • Not retried: the per-run artifact listing and downloads in gha-artifact-download.sh make a few requests per run, not about 110, so they are left unchanged.

Implementation diff: +12 / −3 lines in 1 file (excludes lockfiles, tests, docs, release notes, and changelog).

Testing:

  • The script tests pass 201/201, and the workflow tests 182/182.
    • A new test makes the fixture fail the first two listing calls: discovery retries and finds the run. The previous code fails this test.
    • The existing failure test now also checks that discovery gives up after five attempts.
  • I ran the fixed script against the live repository with the alpha collector's glob. It read all 116 pages, recovered from one transient 500, and returned the master build run from ci: build the container-runtime rootfs natively, upload compressed artifacts unzipped, ship the Pi image gzipped #4795's merge. A real apt-publish-alpha run happens on the first master build after this merges.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

GitHub intermittently answers the repository artifacts listing with an
empty HTTP 500. Glob discovery reads about 110 pages of it per lookup, so
one such answer failed every alpha apt publication since #4795 with
'unexpected end of JSON input'. Each page now retries up to five times
with a growing delay before discovery fails.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
@helix-red helix-red added the repo Repository maintenance label Nov 19, 2026

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed fa0cb12. No blocking findings. The retry remains scoped to each listing page, stops after five attempts with bounded backoff, and preserves failure propagation for both the alpha collector and image-run lookup. The regression coverage exercises transient recovery and retry exhaustion. The branch merges cleanly with current master.

Existing script/workflow and formatting CI passed; other CI jobs remain pending. No builds or tests run during review.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

@helix-red
helix-red requested a review from dr-bonez November 19, 2026 21:52
@dr-bonez
dr-bonez merged commit 0095c0e into master Nov 20, 2026
29 checks passed
@dr-bonez
dr-bonez deleted the fix/artifact-listing-retry branch November 20, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

repo Repository maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants