Skip to content

fix(docs): propagate forge build failures from compile-solidity#23082

Closed
AztecBot wants to merge 1 commit into
merge-train/spartanfrom
claudebox/fix-mt-spartan-23071
Closed

fix(docs): propagate forge build failures from compile-solidity#23082
AztecBot wants to merge 1 commit into
merge-train/spartanfrom
claudebox/fix-mt-spartan-23071

Conversation

@AztecBot

@AztecBot AztecBot commented May 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

The merge-train/spartan CI failed on PR #23071 with a confusing tsc error in docs/examples/ts/aave_bridge:

index.ts(17,24): error TS2307: Cannot find module '../../../target/solidity/aave_bridge/AavePortal.sol/AavePortal.json'

Upstream, compile-solidity had silently swallowed a transient DNS failure while forge tried to download solc 0.8.27:

Compiling aave_bridge...
Error: error sending request for url (https://binaries.soliditylang.org/...)
  - Error #2: failed to lookup address information: Temporary failure in name resolution
Compiling example_swap...
Compiler run successful!
...
Solidity artifacts written to /home/aztec-dev/aztec-packages/docs/target/solidity

The for-loop in compile-solidity didn't check forge build's exit code, so a single subdir failure was lost and the function exited 0. run_step's retry mechanism never engaged, and the missing artifact surfaced later as a misleading TS2307 in validate-ts.

Fix

Check forge build's exit code and propagate the failure. Now run_step will retry on transient solc-download errors and surface real failures clearly instead of through a downstream tsc message.

Note on the pattern: the natural (set -e; ...) || return $? doesn't work — bash disables set -e inside subshells used in tested contexts (followed by ||/&&). Hence the explicit if ! inside the loop plus a captured rc variable.

Full analysis: https://gist.github.com/AztecBot/20ca584ea73d1f44e2d1ebb49e482e90

Test plan

  • Locally simulated a forge failure (replaced AavePortal.sol with garbage) — compile-solidity now exits 1
  • Happy path still exits 0 and produces all artifacts under docs/target/solidity/{aave_bridge,example_swap,nft_bridge}/
  • Merge-train/spartan CI re-runs cleanly

ClaudeBox log: https://claudebox.work/s/973f5812fcfc30d8?run=1

@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels May 8, 2026
@AztecBot

Copy link
Copy Markdown
Collaborator Author

Automatically closing this stale claudebox draft PR (no updates for 5+ days). Re-open if still needed.

@AztecBot AztecBot closed this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant