Repository navigation
fix(ci): reuse cached foundry instead of downloading (EXSC-1307) - #2631
Conversation
foundry-toolchain fetches foundryup from GitHub releases on every run, so a releases outage failed jobs whose toolchain cache already held the pinned binaries. Check the restored forge against .foundry-version and skip the install when it matches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughThe setup action checks the executability and version of cached Foundry tools. If the tools match the pinned version, the action adds their directory to ChangesFoundry setup
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk:
|
…1307) Check forge, cast, anvil and chisel inside ~/.foundry/bin rather than whatever forge PATH resolves, hide the expected miss output, and skip the final version check when the cached binary was already verified. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…up-foundry-skip-the-foundryup-download # Conflicts: # .github/actions/setup-foundry/action.yml
🔍 QA Review — EXSC-1307 · PR #2631 — ✅ Approve
Summary
Acceptance Criteria
FindingsNone. Notes (not gating)
Verified
Test CoverageCI-only change; proven by the PR's own runs. Not executed by this review. AuditNo |
There was a problem hiding this comment.
🤖 [Automated QA Review] Approved — PR #2631: setup-foundry skips the foundryup download on a verified pinned cache hit; retry AC is a documented author scope decision; 0 findings
The skip path ran forge/cast/anvil/chisel from the shared toolchain cache without the attestation check foundryup does on reuse. Compare them against the release-attested linux_amd64 SHA-256 values in .foundry-sha256 before running any; a mismatch, stale file or other runner platform falls back to the install. The final version check now runs on both paths again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Which Linear task belongs to this PR?
Fixes EXSC-1307
Why did I implement it this way?
foundry-toolchain(pinned at 908c540) always downloads foundryup from GitHub releases and runsfoundryup --install, even when the pinned binaries are already restored from our toolchain cache. On 8 Nov a GitHub releases outage made 8 scheduled Timelock Auto Execution runs fail in that step despite a cache hit. A new step insetup-foundrynow runsverify-foundry-version.shagainst~/.foundry/binafter the cache restore; on a match it adds that directory to PATH and the install step is skipped. On a miss or wrong version, it installs as before. The check uses the binary rather thancache-hit, becausecache-hitis false on a restore-keys match (e.g. after afoundry.tomledit) even when the restored binary is the pinned version. Before skipping, the step checks the four cached binaries (forge, cast, anvil, chisel) against the release-attested linux_amd64 SHA-256 values in the new.foundry-sha256, the same check foundryup runs before reusing an installed version. It hashes them before running any of them. A mismatch, a hash file whose version line differs from.foundry-version, or a non-Linux/X64 runner falls back to the install. The hashes are the subjects reported bygh attestation verifyforfoundry_v1.9.0_linux_amd64.tar.gz. A Foundry bump must update.foundry-sha256in the same PR (documented indocs/Setup.mdand rule 500); until it does, CI reinstalls on every run. The final "Verify foundry version" step runs on both paths. The PR also corrects the cache comment that said foundry-toolchain skips the download on a matching install.The ticket's retry-on-failure criterion is not implemented; the reason is in the Linear comment. The
GITHUB_PATHwrite carries azizmor: ignore[github-env]because the value is the fixed~/.foundry/bin.Skip path on this PR's CI: run-unit-tests (libraries) logged "Using cached foundry; skipping install" and passed. The same outage class recurred on 9 Nov: Timelock Auto Execution on
mainfailed at 07:25, 07:34 and 07:43 UTC with a 504 in the foundryup download (e.g. run 42581105464).Checklist before requesting a review
Checklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)
🤖 Generated with Claude Code