Skip to content

fix: retry and validate Sharp binary downloads - #252

Merged
bestickley merged 2 commits into
mainfrom
worktree-fix-249-sharp-download-retry
Aug 25, 2026
Merged

fix: retry and validate Sharp binary downloads#252
bestickley merged 2 commits into
mainfrom
worktree-fix-249-sharp-download-retry

Conversation

@bestickley

Copy link
Copy Markdown
Contributor

Summary

  • downloadAndInstallSharpBinaries used curl -L with no --fail/retry, so a dropped connection mid-download could leave a truncated .tgz cached with a successful exit code
  • Every subsequent synth/destroy in the same job then reused that same corrupt cache entry and failed at tar extraction with unexpected end of file
  • Added --fail --retry 3 --retry-delay 1 to the curl call, and added a non-empty check on cached files (both pre-existing and freshly downloaded), discarding and re-downloading when invalid

Fixes #249

Test plan

  • pnpm compile passes
  • pnpm eslint src/nextjs-build/nextjs-build.ts passes

curl had no --fail/--retry, so an interrupted transfer could leave a
truncated, zero-byte, or partial .tgz cached with a success exit code.
Every subsequent synth/destroy in the same job then hit the same
corrupt cache entry and failed at extraction.

Add --fail --retry 3 --retry-delay 1 to curl, and validate cached
files (existing or freshly downloaded) are non-empty before trusting
them, discarding and re-downloading otherwise.

Fixes #249
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@bestickley
bestickley disabled auto-merge August 25, 2026 17:12
@bestickley
bestickley merged commit 6410608 into main Aug 25, 2026
14 checks passed
@bestickley
bestickley deleted the worktree-fix-249-sharp-download-retry branch August 25, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sharp binary download has no retry/integrity check, can poison the cache

1 participant