Skip to content

feat(ci): add interface change detection workflow#7597

Merged
larryob merged 13 commits into
mainfrom
interface-checker
Dec 20, 2025
Merged

feat(ci): add interface change detection workflow#7597
larryob merged 13 commits into
mainfrom
interface-checker

Conversation

@larryob
Copy link
Copy Markdown
Contributor

@larryob larryob commented Dec 11, 2025

Description

  • Add a new CI workflow to detect interface (ABI) changes in Solidity contracts, similar to the existing
    bytecode checker

Motivation

This workflow helps catch unintended breaking changes to contract interfaces during PRs. While bytecode
changes will occur during all changes to the contracts, interface changes are more sensitive (i.e. they may be breaking changes).

How it works
  1. On PRs that modify solidity/**, the workflow generates ABIs for all contracts on both the PR branch and
    base branch
  2. Compares the two sets of interfaces using diff
  3. Fails if any interface changes are detected, prompting explicit review
  4. Skips changeset release PRs where interface changes are expected
Local usage

pnpm -C solidity test-interface [base-dir] [head-dir]

Test plan

See #7642 and this github action in particular: https://github.com/hyperlane-xyz/hyperlane-monorepo/actions/runs/20316390691/job/58361028101?pr=7642. The action successfully detects that the original signature for processor was edited.

See also the unit tests (pnpm -C solidity test:interface)

Summary by CodeRabbit

  • New Features

    • Automated interface-change detection on Solidity PRs that compares PR vs base and fails CI on breaking removals.
    • Repository command and script to generate and compare contract ABIs for interface checks; npm scripts added to run them.
  • Tests

    • Comprehensive interface-compatibility test suite validating detection of breaking and non‑breaking changes.
  • Chores

    • Updated ignore rules to exclude generated interface and bytecode artifacts.
    • CI workflow configured to run interface generation and comparison on PRs.

✏️ Tip: You can customize this high-level summary in your review settings.

larryob and others added 2 commits December 11, 2025 00:06
Add a new CI workflow to detect interface (ABI) changes in Solidity contracts,
similar to the existing bytecode checker. This helps catch unintended breaking
changes to contract interfaces during PRs.

- Add interface.sh script using `forge inspect <Contract> abi`
- Add interface-analysis.yml workflow to compare interfaces between PR and base
- Add `interface` npm script to package.json

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Dec 11, 2025

⚠️ No Changeset found

Latest commit: 1df012a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.02%. Comparing base (b3027cf) to head (1df012a).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##           main    #7597       +/-   ##
=========================================
+ Coverage      0   77.02%   +77.02%     
=========================================
  Files         0      117      +117     
  Lines         0     2651     +2651     
  Branches      0      244      +244     
=========================================
+ Hits          0     2042     +2042     
- Misses        0      593      +593     
- Partials      0       16       +16     
Flag Coverage Δ
solidity 77.02% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
core 87.80% <ø> (∅)
hooks 71.86% <ø> (∅)
isms 81.10% <ø> (∅)
token 86.67% <ø> (∅)
middlewares 84.98% <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@larryob larryob marked this pull request as ready for review December 11, 2025 14:40
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 11, 2025

📝 Walkthrough

Walkthrough

Adds a GitHub Actions workflow to detect Solidity interface removals, a Bash tool to generate/compare contract ABIs, npm scripts to run it, .gitignore updates for generated artifacts, and a Forge-based TypeScript test harness that exercises multiple breaking/non‑breaking interface variants. (50 words)

Changes

Cohort / File(s) Summary
CI / Workflow
\.github/workflows/interface-analysis.yml
New workflow "Check Interface Changes": triggers on PRs touching Solidity or via manual dispatch; checks out PR and base refs, sets up Node and Foundry, generates HEAD and base interface outputs, and compares them to fail on removals.
Interface tooling
solidity/interface.sh, solidity/package.json
New Bash script with modes to generate JSON ABIs from ./contracts (excludes test/mock/interfaces/libs/upgrade/dependencies patterns) and to compare base vs head ABIs, reporting removals as failures. Added npm scripts: "interface": "./interface.sh" and "test:interface": "pnpm tsx ./test/interface.test.ts".
Tests
solidity/test/interface.test.ts
New TypeScript test harness that creates contract variants, generates ABIs, runs the interface comparison, and asserts expected breaking/non‑breaking outputs across multiple scenarios.
Ignore artifacts
solidity/.gitignore
Updated ignore entries: replaced -bytecode/ with bytecode/ and added interface/ to ignore generated artifact dumps.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant PR as Pull Request
    participant GH as GitHub Actions
    participant Runner as ubuntu-latest
    participant Repo as Repository
    participant Node as Node/pnpm
    participant Foundry as Foundry (forge)
    participant Script as solidity/interface.sh

    note over GH,Runner: Workflow triggers on PR changes to Solidity or manual dispatch

    PR->>GH: PR created/updated (Solidity files)
    GH->>Runner: start job
    Runner->>Repo: checkout PR ref (HEAD)
    Runner->>Node: setup Node (from .nvmrc) & install deps (cache)
    Runner->>Foundry: setup Foundry toolchain
    Runner->>Script: run generate -> produce HEAD-interface
    Runner->>Repo: fetch base ref `solidity/contracts` (BASE_REF)
    Runner->>Repo: checkout base ref contents
    Runner->>Script: run generate -> produce base-interface
    Runner->>Script: run compare HEAD-interface vs base-interface
    alt breaking removals detected
        Script->>Runner: exit non-zero with removal report
        Runner->>GH: fail job with removal report
    else only additions or no breaking changes
        Script->>Runner: exit zero with summary
        Runner->>GH: pass or warn with summary
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Review .github/workflows/interface-analysis.yml for correct checkout of base ref, BASE_REF handling, PR exclusion logic, and caching.
  • Audit solidity/interface.sh for path exclusions, correct use of forge inspect, robust jq parsing, handling of missing ABIs, and exit codes on removals.
  • Inspect solidity/test/interface.test.ts for deterministic file setup/teardown, reliability of ABI generation, and assertion coverage for variants.
  • Quick check of solidity/.gitignore and solidity/package.json scripts.

Suggested reviewers

  • ltyu
  • yorhodes

Poem

Ogres like quiet checks in the bog,
Forge grunts, scripts hum through the fog,
ABIs lined up, I poke and I pry,
If somethin' vanished — that makes me sigh,
But addin' new bits? Well, keep on the jog. 🐸

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change—adding a CI workflow for interface change detection in Solidity contracts.
Description check ✅ Passed The description covers all required sections with clear explanations of what, why, and how, plus testing details and local usage examples.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch interface-checker

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (6)
solidity/interface.sh (4)

6-6: Use mapfile to avoid splitting issues with special characters in filenames. The static analysis tool flagged this (SC2207), and it's a fair point. If any contract path contains newlines or special chars, this approach could stumble.

-IFS=$'\n'
-CONTRACT_FILES=($(find ./contracts -type f))
-unset IFS
+mapfile -t CONTRACT_FILES < <(find ./contracts -type f)

10-10: Quote variables to handle paths with spaces or special characters. $OUTPUT_PATH and $contract should be wrapped in quotes to be bulletproof.

-mkdir -p $OUTPUT_PATH
+mkdir -p "$OUTPUT_PATH"

And in the forge inspect call:

-        forge inspect "$contract" abi > "$OUTPUT_PATH/$contract-abi.json"
+        forge inspect "$contract" abi > "$OUTPUT_PATH/$contract-abi.json"

Actually, the second one is already quoted in the file path portion—just need the first one.

Also applies to: 33-33


24-24: Contract extraction could miss indented contracts. The grep pattern ^contract only matches contracts at the start of a line. If any contracts are indented (which shouldn't happen in valid Solidity, but just in case), they'd be skipped. Consider using grep -o with a pattern that allows leading whitespace if you want to be extra thorough.


31-34: Add error handling for forge inspect failures. If forge inspect fails (e.g., contract doesn't exist), the script silently continues. Consider checking the exit code and logging or failing explicitly so you don't end up with incomplete ABI sets.

     # Process each contract found in the file
     for contract in $contracts; do
         echo "Generating interface of $contract"
-        forge inspect "$contract" abi > "$OUTPUT_PATH/$contract-abi.json"
+        if ! forge inspect "$contract" abi > "$OUTPUT_PATH/$contract-abi.json"; then
+            echo "ERROR: Failed to generate ABI for contract $contract" >&2
+            exit 1
+        fi
     done
.github/workflows/interface-analysis.yml (2)

50-61: Quote the BASE_REF variable in git commands. Actionlint flagged this (SC2086), and it's proper defensive shell coding. Even though BASE_REF should be a branch name or commit SHA, quoting protects against edge cases.

         # Fetch the base reference
-        git fetch origin $BASE_REF
+        git fetch origin "$BASE_REF"
         # Check if BASE_REF is a commit SHA (40 hex characters) or a branch name
         if [[ "$BASE_REF" =~ ^[0-9a-f]{40}$ ]]; then
           # For commit SHAs, checkout directly without origin/ prefix
-          git checkout $BASE_REF -- solidity/contracts
+          git checkout "$BASE_REF" -- solidity/contracts
         else
           # For branch names, use origin/ prefix
-          git checkout origin/$BASE_REF -- solidity/contracts
+          git checkout origin/"$BASE_REF" -- solidity/contracts
         fi

70-70: Quote the diff paths to handle potential spaces. Minor robustness improvement—the diff paths should be quoted.

-          DIFF_OUTPUT=$(diff --unified --recursive solidity/base-interface solidity/HEAD-interface || true)
+          DIFF_OUTPUT=$(diff --unified --recursive "solidity/base-interface" "solidity/HEAD-interface" || true)
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aeac943 and 913725b.

📒 Files selected for processing (4)
  • .github/workflows/interface-analysis.yml (1 hunks)
  • solidity/.gitignore (1 hunks)
  • solidity/interface.sh (1 hunks)
  • solidity/package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-11-24T17:19:38.362Z
Learnt from: CR
Repo: hyperlane-xyz/hyperlane-monorepo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T17:19:38.362Z
Learning: Run all tests using `yarn test` for unified testing; use workspace-specific commands for targeted testing (Hardhat, Forge for Solidity; Unit tests for TypeScript; Cargo for Rust)

Applied to files:

  • solidity/package.json
📚 Learning: 2025-11-24T17:19:38.362Z
Learnt from: CR
Repo: hyperlane-xyz/hyperlane-monorepo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T17:19:38.362Z
Learning: Use `yarn lint` for all workspaces, `solhint` for Solidity-specific linting, and `cargo clippy` for Rust linting

Applied to files:

  • solidity/package.json
📚 Learning: 2025-07-01T18:44:43.514Z
Learnt from: larryob
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6661
File: solidity/contracts/avs/HyperlaneServiceManager.sol:21-23
Timestamp: 2025-07-01T18:44:43.514Z
Learning: Test files and script files in Solidity projects typically don't need absolute import fixes with the same urgency as contract files, since they are not imported by other modules in the codebase. The compilation issues from absolute imports mainly affect files under the contracts directory that users import from.

Applied to files:

  • solidity/interface.sh
🪛 actionlint (1.7.9)
.github/workflows/interface-analysis.yml

51-51: shellcheck reported issue in this script: SC2086:info:2:18: Double quote to prevent globbing and word splitting

(shellcheck)


51-51: shellcheck reported issue in this script: SC2086:info:6:16: Double quote to prevent globbing and word splitting

(shellcheck)


51-51: shellcheck reported issue in this script: SC2086:info:9:23: Double quote to prevent globbing and word splitting

(shellcheck)

🪛 Shellcheck (0.11.0)
solidity/interface.sh

[warning] 6-6: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)

🔇 Additional comments (4)
solidity/.gitignore (1)

31-33: Looks good—proper alignment with the new workflow. The bytecode and interface directories are now properly ignored, which keeps the generated artifacts out of version control. That's the way it should be.

solidity/package.json (1)

93-93: Clean addition. The interface script integrates nicely alongside the bytecode script. Makes it easy for folks to run it locally via yarn interface.

.github/workflows/interface-analysis.yml (2)

15-19: Good skipping logic for changeset-release PRs. The condition to skip changeset release PRs makes sense—those expect version bumps and interface changes, so forcing them to fail would be noisy.


44-45: Workflow flow looks solid. Generates interfaces on both PR and base branches, then diffs them. Clean approach that mirrors the bytecode checker pattern. The use of HEAD-interface and base-interface as directory names keeps things tidy.

Comment thread solidity/interface.sh Outdated
@github-project-automation github-project-automation Bot moved this from In Review to In Progress in Hyperlane Tasks Dec 11, 2025
Update the interface analysis workflow to only fail when functions are
removed from contract interfaces (breaking changes). Function additions
are now reported as non-breaking and don't cause failures.

- Add comparison mode to interface.sh using jq to parse ABIs
- Extract and compare function signatures between base and HEAD
- Report additions as info, fail only on removals

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (5)
solidity/interface.sh (4)

92-101: Use mapfile instead of array assignment from command substitution, and quote variables.

Lines like 96 are prone to word splitting and glob expansion issues when filenames have spaces. The static analysis caught this with SC2207. Also, the mkdir on line 100 should quote the variable.

Apply this diff to make the script more robust:

-IFS=$'\n'
-CONTRACT_FILES=($(find ./contracts -type f))
-unset IFS

+mapfile -t CONTRACT_FILES < <(find ./contracts -type f)

 echo "Generating interfaces (ABIs) in $OUTPUT_PATH"
-mkdir -p $OUTPUT_PATH
+mkdir -p "$OUTPUT_PATH"

102-118: Contract name extraction may need refinement for edge cases.

Line 114's grep pattern matches any contract keyword followed by a valid identifier, which works for most Solidity files. However, it doesn't distinguish between regular contracts, abstract contracts, libraries, or interfaces. For instance, it'll catch abstract contract Foo (extracting Foo) which is correct, but the regex is fairly permissive.

If you need to be more selective about what gets included, consider updating the pattern or adding a filter step. For now, this should work fine if forge inspect handles invalid contracts gracefully (or if you want to include all types).


120-125: Add error handling for forge inspect failures.

The script doesn't check if the forge command succeeds. If forge inspect fails (contract doesn't exist, forge not installed, etc.), the output file might be empty or contain error text, which could cause confusing failures later in the comparison phase.

Consider adding a check:

     for contract in $contracts; do
         echo "Generating interface of $contract"
-        forge inspect "$contract" abi --json > "$OUTPUT_PATH/$contract-abi.json"
+        if ! forge inspect "$contract" abi --json > "$OUTPUT_PATH/$contract-abi.json"; then
+            echo "ERROR: Failed to generate interface for $contract" >&2
+            exit 1
+        fi
     done

36-56: Function signature extraction could silently fail if jq is unavailable.

Lines 38-39 use jq to extract function signatures. If jq isn't installed or the JSON is malformed, the command will fail silently (stderr redirected to /dev/null), and base_funcs and head_funcs will be empty. This would cause the comparison to incorrectly report all functions as removed.

Add a check for jq availability and error handling:

+# Check jq is available
+if ! command -v jq &> /dev/null; then
+    echo "ERROR: jq is required but not installed"
+    exit 1
+fi
+
 # Extract function signatures from base and head
 # Format: functionName(type1,type2,...)
-base_funcs=$(jq -r '.[] | select(.type == "function") | .name + "(" + ([.inputs[].type] | join(",")) + ")"' "$base_file" 2>/dev/null | sort)
-head_funcs=$(jq -r '.[] | select(.type == "function") | .name + "(" + ([.inputs[].type] | join(",")) + ")"' "$head_file" 2>/dev/null | sort)
+base_funcs=$(jq -r '.[] | select(.type == "function") | .name + "(" + ([.inputs[].type] | join(",")) + ")"' "$base_file" | sort) || { echo "ERROR: Failed to parse $base_file"; exit 1; }
+head_funcs=$(jq -r '.[] | select(.type == "function") | .name + "(" + ([.inputs[].type] | join(",")) + ")"' "$head_file" | sort) || { echo "ERROR: Failed to parse $head_file"; exit 1; }
.github/workflows/interface-analysis.yml (1)

48-61: Quote variables in the shell script to prevent word splitting.

The git commands on lines 53, 57, and 60 should quote $BASE_REF to handle branch names or SHAs with unexpected spacing (though that's unlikely in practice). The static analysis flagged SC2086, which is valid here.

Apply this diff:

         run: |
           # Fetch the base reference
-          git fetch origin $BASE_REF
+          git fetch origin "$BASE_REF"
           # Check if BASE_REF is a commit SHA (40 hex characters) or a branch name
           if [[ "$BASE_REF" =~ ^[0-9a-f]{40}$ ]]; then
             # For commit SHAs, checkout directly without origin/ prefix
-            git checkout $BASE_REF -- solidity/contracts
+            git checkout "$BASE_REF" -- solidity/contracts
           else
             # For branch names, use origin/ prefix
-            git checkout origin/$BASE_REF -- solidity/contracts
+            git checkout origin/"$BASE_REF" -- solidity/contracts
           fi
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 913725b and d7975c1.

📒 Files selected for processing (2)
  • .github/workflows/interface-analysis.yml (1 hunks)
  • solidity/interface.sh (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-01T18:44:43.514Z
Learnt from: larryob
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6661
File: solidity/contracts/avs/HyperlaneServiceManager.sol:21-23
Timestamp: 2025-07-01T18:44:43.514Z
Learning: Test files and script files in Solidity projects typically don't need absolute import fixes with the same urgency as contract files, since they are not imported by other modules in the codebase. The compilation issues from absolute imports mainly affect files under the contracts directory that users import from.

Applied to files:

  • solidity/interface.sh
🪛 actionlint (1.7.9)
.github/workflows/interface-analysis.yml

51-51: shellcheck reported issue in this script: SC2086:info:2:18: Double quote to prevent globbing and word splitting

(shellcheck)


51-51: shellcheck reported issue in this script: SC2086:info:6:16: Double quote to prevent globbing and word splitting

(shellcheck)


51-51: shellcheck reported issue in this script: SC2086:info:9:23: Double quote to prevent globbing and word splitting

(shellcheck)

🪛 Shellcheck (0.11.0)
solidity/interface.sh

[warning] 96-96: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (67)
  • GitHub Check: coverage-run
  • GitHub Check: cli-evm-e2e-matrix (core-read)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-3)
  • GitHub Check: cli-evm-e2e-matrix (warp-send)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-recovery)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-init)
  • GitHub Check: cli-evm-e2e-matrix (warp-read)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-basic)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-1)
  • GitHub Check: cli-evm-e2e-matrix (core-init)
  • GitHub Check: cli-evm-e2e-matrix (warp-rebalancer)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-hook-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ism-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-4)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-5)
  • GitHub Check: cli-evm-e2e-matrix (core-check)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-submitters)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-simple-updates)
  • GitHub Check: cli-evm-e2e-matrix (core-apply)
  • GitHub Check: cli-evm-e2e-matrix (relay)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-rebalancing-config)
  • GitHub Check: cli-evm-e2e-matrix (core-deploy)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, igp)
  • GitHub Check: env-test-matrix (testnet4, sepolia, core)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, igp)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, core)
  • GitHub Check: env-test-matrix (mainnet3, optimism, core)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, core)
  • GitHub Check: env-test-matrix (mainnet3, optimism, igp)
  • GitHub Check: cli-radix-e2e-matrix (warp-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (core-read)
  • GitHub Check: cli-cosmos-e2e-matrix (core-deploy)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-route-extension)
  • GitHub Check: cli-radix-e2e-matrix (core-apply)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-read)
  • GitHub Check: cli-cosmos-e2e-matrix (core-check)
  • GitHub Check: cli-radix-e2e-matrix (core-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (core-apply)
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-apply)
  • GitHub Check: aleo-sdk-e2e-run
  • GitHub Check: cosmos-sdk-e2e-run
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-deploy)
  • GitHub Check: yarn-test-run
  • GitHub Check: cli-install-test-run
  • GitHub Check: infra-test
  • GitHub Check: build-and-push-to-gcr
  • GitHub Check: lint-rs
  • GitHub Check: lander-coverage
  • GitHub Check: test-rs
  • GitHub Check: agent-configs (testnet4)
  • GitHub Check: agent-configs (mainnet3)
  • GitHub Check: lint-prettier
  • GitHub Check: e2e-matrix (evm)
  • GitHub Check: fork-tests
  • GitHub Check: diff-check
  • GitHub Check: slither
  • GitHub Check: diff-check
  • GitHub Check: diff-check
🔇 Additional comments (3)
.github/workflows/interface-analysis.yml (3)

1-20: Nice setup overall—the conditional skip for changeset PRs keeps things tidy.

The workflow triggers on solidity changes and can be manually invoked, which is good. Skipping the changeset-release/main branch avoids false positives when versions bump.


21-42: Checkout and setup steps look solid.

Using the explicit PR head SHA and fallback to github.sha is the right approach. Foundry setup is necessary and correct.


44-69: Workflow flow is clean and well-structured.

The sequence is logical: generate HEAD interfaces, fetch and checkout base contracts, generate base interfaces, then compare. Using the test-interface mode for the comparison is the right call, and passing the directories as arguments is clear.

Copy link
Copy Markdown
Member

@yorhodes yorhodes left a comment

Choose a reason for hiding this comment

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

can you share your testing strategy or some example output?

Comment thread solidity/interface.sh
Comment thread solidity/interface.sh Outdated
larryob and others added 4 commits December 17, 2025 12:34
- Migrate interface-analysis.yml from yarn to pnpm
- Update checkout action to v6

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Include output types in function signature comparison so that changes
to return types are detected as breaking changes.

Format: functionName(inputs)->(outputs)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Now checks for breaking changes in:
- Functions (with inputs and outputs)
- Events
- Errors
- Constructor signature changes
- Fallback/receive function removals

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6531b95 and 6ada4df.

📒 Files selected for processing (1)
  • solidity/interface.sh (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-01T18:44:43.514Z
Learnt from: larryob
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6661
File: solidity/contracts/avs/HyperlaneServiceManager.sol:21-23
Timestamp: 2025-07-01T18:44:43.514Z
Learning: Test files and script files in Solidity projects typically don't need absolute import fixes with the same urgency as contract files, since they are not imported by other modules in the codebase. The compilation issues from absolute imports mainly affect files under the contracts directory that users import from.

Applied to files:

  • solidity/interface.sh
🪛 Shellcheck (0.11.0)
solidity/interface.sh

[warning] 158-158: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (67)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-5)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-4)
  • GitHub Check: cli-evm-e2e-matrix (warp-rebalancer)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-read)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-3)
  • GitHub Check: cli-evm-e2e-matrix (warp-init)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-send)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-rebalancing-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-recovery)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-basic)
  • GitHub Check: cli-evm-e2e-matrix (core-read)
  • GitHub Check: cli-evm-e2e-matrix (core-check)
  • GitHub Check: cli-evm-e2e-matrix (relay)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-simple-updates)
  • GitHub Check: cli-evm-e2e-matrix (core-apply)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-submitters)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-hook-updates)
  • GitHub Check: cli-evm-e2e-matrix (core-deploy)
  • GitHub Check: cli-evm-e2e-matrix (core-init)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ism-updates)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, core)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, igp)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, core)
  • GitHub Check: env-test-matrix (testnet4, sepolia, core)
  • GitHub Check: env-test-matrix (mainnet3, optimism, core)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, igp)
  • GitHub Check: env-test-matrix (mainnet3, optimism, igp)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-read)
  • GitHub Check: cli-cosmos-e2e-matrix (core-read)
  • GitHub Check: aleo-sdk-e2e-run
  • GitHub Check: cli-cosmos-e2e-matrix (core-deploy)
  • GitHub Check: cli-radix-e2e-matrix (core-apply)
  • GitHub Check: cli-cosmos-e2e-matrix (core-apply)
  • GitHub Check: cli-radix-e2e-matrix (core-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (core-check)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-route-extension)
  • GitHub Check: pnpm-test-run
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-apply)
  • GitHub Check: cli-radix-e2e-matrix (warp-deploy)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cosmos-sdk-e2e-run
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-deploy)
  • GitHub Check: cli-install-test-run
  • GitHub Check: coverage-run
  • GitHub Check: build-and-push-to-gcr
  • GitHub Check: infra-test
  • GitHub Check: fork-tests
  • GitHub Check: e2e-matrix (evm)
  • GitHub Check: agent-configs (mainnet3)
  • GitHub Check: lint-prettier
  • GitHub Check: agent-configs (testnet4)
  • GitHub Check: diff-check
  • GitHub Check: slither
  • GitHub Check: lint-rs
  • GitHub Check: test-rs
  • GitHub Check: lander-coverage
  • GitHub Check: diff-check
  • GitHub Check: diff-check

Comment thread solidity/interface.sh Outdated
Comment thread solidity/interface.sh
Comment thread solidity/interface.sh
Comment thread solidity/interface.sh Outdated
Comment thread solidity/interface.sh
Tests cover detection of all ABI breaking changes:
- Function removals
- Return type changes
- Event removals
- Error removals
- Constructor changes
- Receive function removals
- Fallback function removals
- No changes (should pass)
- Additions only (should pass)

Run with: pnpm -C solidity test:interface

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
solidity/test/interface.test.ts (2)

472-489: The interface check runner does its job like a good donkey.

The error handling pattern captures the exit code and output properly.

One tiny thing - on line 486, if both error.stdout and error.stderr have content, only stdout is captured. In most cases this is fine, but if the interface script writes important info to stderr, it might be missed. Consider concatenating them:

   } catch (error: any) {
     return {
       exitCode: error.status || 1,
-      output: error.stdout || error.stderr || '',
+      output: (error.stdout || '') + (error.stderr || ''),
     };
   }

483-488: A note about that any type, if ye care about such things.

Using error: any in the catch block works, but TypeScript purists might prefer unknown with proper type narrowing. For a test script, this is perfectly fine - just mentionin' it in case someone gets picky.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6ada4df and 5211afa.

📒 Files selected for processing (2)
  • solidity/package.json (1 hunks)
  • solidity/test/interface.test.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
Repo: hyperlane-xyz/hyperlane-monorepo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-15T15:33:46.063Z
Learning: Applies to solidity/**/*.test.sol : Run Solidity tests using both Hardhat and Forge with: pnpm -C solidity test (or individually with test:hardhat and test:forge)
📚 Learning: 2025-12-15T15:33:46.063Z
Learnt from: CR
Repo: hyperlane-xyz/hyperlane-monorepo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-15T15:33:46.063Z
Learning: Applies to solidity/**/*.test.sol : Run Solidity tests using both Hardhat and Forge with: pnpm -C solidity test (or individually with test:hardhat and test:forge)

Applied to files:

  • solidity/test/interface.test.ts
  • solidity/package.json
📚 Learning: 2025-12-15T15:33:46.063Z
Learnt from: CR
Repo: hyperlane-xyz/hyperlane-monorepo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-15T15:33:46.063Z
Learning: Applies to typescript/sdk/**/*.test.{ts,tsx} : Run TypeScript SDK tests with: pnpm -C typescript/sdk test (or unit tests only with test:unit)

Applied to files:

  • solidity/package.json
📚 Learning: 2025-12-15T15:33:46.063Z
Learnt from: CR
Repo: hyperlane-xyz/hyperlane-monorepo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-15T15:33:46.063Z
Learning: Applies to typescript/**/*.{ts,tsx,js,jsx} : Lint TypeScript/JavaScript code with: pnpm lint

Applied to files:

  • solidity/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (67)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-submitters)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cli-evm-e2e-matrix (core-check)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-4)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-basic)
  • GitHub Check: cli-evm-e2e-matrix (warp-init)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-2)
  • GitHub Check: cli-evm-e2e-matrix (core-init)
  • GitHub Check: cli-evm-e2e-matrix (relay)
  • GitHub Check: cli-evm-e2e-matrix (warp-rebalancer)
  • GitHub Check: cli-evm-e2e-matrix (core-apply)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-3)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ism-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-hook-updates)
  • GitHub Check: cli-evm-e2e-matrix (core-deploy)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-5)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-simple-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-recovery)
  • GitHub Check: cli-evm-e2e-matrix (warp-read)
  • GitHub Check: cli-evm-e2e-matrix (core-read)
  • GitHub Check: cli-evm-e2e-matrix (warp-send)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-rebalancing-config)
  • GitHub Check: cli-cosmos-e2e-matrix (core-check)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, igp)
  • GitHub Check: env-test-matrix (mainnet3, optimism, core)
  • GitHub Check: env-test-matrix (mainnet3, optimism, igp)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, core)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (core-read)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, core)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, igp)
  • GitHub Check: env-test-matrix (testnet4, sepolia, core)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-read)
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (core-apply)
  • GitHub Check: cli-cosmos-e2e-matrix (core-deploy)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-route-extension)
  • GitHub Check: cli-radix-e2e-matrix (core-apply)
  • GitHub Check: cli-radix-e2e-matrix (warp-deploy)
  • GitHub Check: cli-radix-e2e-matrix (core-deploy)
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-apply)
  • GitHub Check: aleo-sdk-e2e-run
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: pnpm-test-run
  • GitHub Check: cosmos-sdk-e2e-run
  • GitHub Check: cli-install-test-run
  • GitHub Check: coverage-run
  • GitHub Check: build-and-push-to-gcr
  • GitHub Check: infra-test
  • GitHub Check: lint-rs
  • GitHub Check: test-rs
  • GitHub Check: lander-coverage
  • GitHub Check: slither
  • GitHub Check: fork-tests
  • GitHub Check: diff-check
  • GitHub Check: agent-configs (testnet4)
  • GitHub Check: agent-configs (mainnet3)
  • GitHub Check: diff-check
  • GitHub Check: lint-prettier
  • GitHub Check: e2e-matrix (evm)
  • GitHub Check: diff-check
🔇 Additional comments (6)
solidity/package.json (1)

93-97: These script additions are lookin' good, like onions with perfect layers.

The new interface and test:interface scripts follow the existing patterns in this package (similar to bytecode and other test scripts). Using pnpm tsx is consistent with how other TypeScript tests are run here.

solidity/test/interface.test.ts (5)

14-19: Imports and setup are sittin' pretty in their swamp.

Using import.meta.dirname is the right approach for ESM modules, and the path resolution to SOLIDITY_DIR is clean.


74-425: Now this here is a fine collection of test cases, like all the layers you could want.

The CONTRACT_VARIANTS cover the essential breaking change scenarios comprehensively:

  • Function removals and signature changes
  • Event/error removals
  • Constructor changes
  • Receive/fallback removals
  • Positive cases (no changes, additions only)

The shouldFail and expectedMatch properties make the assertions clear and maintainable.


438-456: The swamp gets cleaned up after each visit, that's how it should be.

The temp directory approach with Date.now() suffix works fine for sequential test runs. The cleanup() function properly removes both the temp directory and the test contract from the contracts directory.

One small thing to keep in yer swamp - if the test process is killed unexpectedly, the InterfaceTestContract.sol file might be left behind in contracts/test/. Not a big deal since .gitignore probably won't track it, but somethin' to be aware of.


498-538: The test loop is organized better than my mud bath routine.

Good things here:

  • The finally block ensures cleanup happens even if tests throw
  • Both exit code and output content are validated
  • Failure logging includes enough detail to debug issues
  • Each test gets fresh directories via createTestDirs()

540-547: The results summary wraps things up nicely, like closin' the door to keep the villagers out.

The exit code handling ensures CI will properly fail when tests don't pass. Clear and simple.

larryob and others added 3 commits December 17, 2025 15:42
Update contract extraction regex to also capture abstract contracts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Define contract parts once in CONTRACT_PARTS object
- Add buildContract() function to compose contracts from config
- Test variants now override only the parts that change
- Reduces duplication and improves maintainability

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- All ContractConfig properties are now required (no optional markers)
- Simplify additions_only test to spread base config arrays

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (4)
solidity/test/interface.test.ts (4)

99-124: Optional: Simplify conditionals for required properties.

The conditionals check truthiness of config.events, config.errors, config.constructor, and config.functions, but these are required properties in the ContractConfig interface (lines 86-93). Empty arrays are truthy, so these checks work but could be clearer by checking .length > 0 for arrays or removing them entirely if empty sections are acceptable.

🔎 Example simplification
  // Events
- if (config.events) {
+ if (config.events.length > 0) {
    parts.push('    // Events');
    parts.push(...config.events.map((e) => `    ${e}`));
  }

307-308: Optional: Remove redundant execSync options.

The env: { ...process.env } and stdio: 'pipe' options are redundant—execSync already uses process.env and defaults to 'pipe' for stdio when not capturing output via other means.

🔎 Simplification
   execSync(
     `forge inspect InterfaceTestContract abi --json > "${outputDir}/InterfaceTestContract-abi.json"`,
     {
       cwd: SOLIDITY_DIR,
-      env: { ...process.env },
-      stdio: 'pipe',
     },
   );

And similarly at line 320:

     const output = execSync(
       `./interface.sh test-interface "${baseAbiDir}" "${headAbiDir}"`,
       {
         cwd: SOLIDITY_DIR,
         encoding: 'utf8',
-        stdio: 'pipe',
       },
     );

Also applies to: 320-320


340-340: Guard cleanup against undefined testDir.

If createTestDirs() throws before setting testDir, the cleanup() call in the finally block at line 377 will reference an undefined variable. Initialize testDir to an empty string or add a guard in cleanup().

🔎 Example guard in cleanup
 function cleanup() {
-  if (existsSync(testDir)) {
+  if (testDir && existsSync(testDir)) {
     rmSync(testDir, { recursive: true, force: true });
   }
   // Clean up test contract from solidity directory
   if (existsSync(testContractPath)) {
     rmSync(testContractPath, { force: true });
   }
 }

Also applies to: 377-377


339-379: Consider parallelization after fixing source-tree isolation.

The sequential test execution is currently necessary due to the shared testContractPath in the source tree, but once that isolation issue is resolved, you could speed up the test suite by running variants in parallel.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 33726e6 and 692fd69.

📒 Files selected for processing (1)
  • solidity/test/interface.test.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-01T18:44:43.514Z
Learnt from: larryob
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6661
File: solidity/contracts/avs/HyperlaneServiceManager.sol:21-23
Timestamp: 2025-07-01T18:44:43.514Z
Learning: Test files and script files in Solidity projects typically don't need absolute import fixes with the same urgency as contract files, since they are not imported by other modules in the codebase. The compilation issues from absolute imports mainly affect files under the contracts directory that users import from.

Applied to files:

  • solidity/test/interface.test.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (68)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ism-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-basic)
  • GitHub Check: cli-evm-e2e-matrix (warp-send)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-simple-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-3)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-submitters)
  • GitHub Check: cli-evm-e2e-matrix (warp-init)
  • GitHub Check: cli-evm-e2e-matrix (warp-rebalancer)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-hook-updates)
  • GitHub Check: cli-evm-e2e-matrix (status)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-rebalancing-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-recovery)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-4)
  • GitHub Check: cli-evm-e2e-matrix (warp-read)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-2)
  • GitHub Check: cli-evm-e2e-matrix (core-check)
  • GitHub Check: cli-evm-e2e-matrix (core-init)
  • GitHub Check: cli-evm-e2e-matrix (core-apply)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-5)
  • GitHub Check: cli-evm-e2e-matrix (core-deploy)
  • GitHub Check: cli-evm-e2e-matrix (core-read)
  • GitHub Check: cli-evm-e2e-matrix (relay)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, igp)
  • GitHub Check: env-test-matrix (testnet4, sepolia, core)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, core)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-deploy)
  • GitHub Check: env-test-matrix (mainnet3, optimism, igp)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, core)
  • GitHub Check: env-test-matrix (mainnet3, optimism, core)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-read)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, igp)
  • GitHub Check: cli-cosmos-e2e-matrix (core-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (core-check)
  • GitHub Check: cli-cosmos-e2e-matrix (core-apply)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-route-extension)
  • GitHub Check: cli-cosmos-e2e-matrix (core-read)
  • GitHub Check: cli-radix-e2e-matrix (core-deploy)
  • GitHub Check: cosmos-sdk-e2e-run
  • GitHub Check: cli-radix-e2e-matrix (warp-deploy)
  • GitHub Check: cli-radix-e2e-matrix (core-apply)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-apply)
  • GitHub Check: coverage-run
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-deploy)
  • GitHub Check: aleo-sdk-e2e-run
  • GitHub Check: pnpm-test-run
  • GitHub Check: cli-install-test-run
  • GitHub Check: infra-test
  • GitHub Check: build-and-push-to-gcr
  • GitHub Check: e2e-matrix (evm)
  • GitHub Check: agent-configs (testnet4)
  • GitHub Check: lint-prettier
  • GitHub Check: lint-rs
  • GitHub Check: agent-configs (mainnet3)
  • GitHub Check: lander-coverage
  • GitHub Check: test-rs
  • GitHub Check: fork-tests
  • GitHub Check: diff-check
  • GitHub Check: slither
  • GitHub Check: diff-check
  • GitHub Check: diff-check

Comment thread solidity/test/interface.test.ts
Comment thread solidity/test/interface.test.ts
Comment thread solidity/test/interface.test.ts
Copy link
Copy Markdown
Member

@yorhodes yorhodes left a comment

Choose a reason for hiding this comment

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

thanks for adding tests

Comment thread solidity/interface.sh Outdated
Comment thread solidity/interface.sh Outdated
- Add find_removed() helper for detecting removed ABI entries
- Add find_added() helper for detecting added ABI entries
- Add extract_signatures() helper with case switch for ABI types
- Loop over ABI types instead of repeating code blocks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add constructor to the ABI types loop instead of handling it separately.
The find_removed/find_added helpers work correctly for constructors too.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@larryob larryob enabled auto-merge December 19, 2025 23:39
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
solidity/interface.sh (1)

160-163: forge inspect needs error handling.

Right now if forge fails—maybe the contract name's wrong, compilation breaks, or something else goes sideways—you'll just get an empty or busted JSON file without any heads up. When the test-interface mode runs later, it'll produce confusing results or silently skip stuff.

🔎 Catch forge failures
 for contract in $contracts; do
     echo "Generating interface of $contract"
-    forge inspect "$contract" abi --json > "$OUTPUT_PATH/$contract-abi.json"
+    if ! forge inspect "$contract" abi --json > "$OUTPUT_PATH/$contract-abi.json" 2>&1; then
+        echo "WARNING: Failed to generate ABI for $contract" >&2
+        rm -f "$OUTPUT_PATH/$contract-abi.json"  # Clean up any partial output
+    fi
 done
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 692fd69 and 1df012a.

📒 Files selected for processing (1)
  • solidity/interface.sh (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-07-01T18:44:43.514Z
Learnt from: larryob
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6661
File: solidity/contracts/avs/HyperlaneServiceManager.sol:21-23
Timestamp: 2025-07-01T18:44:43.514Z
Learning: Test files and script files in Solidity projects typically don't need absolute import fixes with the same urgency as contract files, since they are not imported by other modules in the codebase. The compilation issues from absolute imports mainly affect files under the contracts directory that users import from.

Applied to files:

  • solidity/interface.sh
📚 Learning: 2025-12-18T22:36:13.376Z
Learnt from: CR
Repo: hyperlane-xyz/hyperlane-monorepo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-18T22:36:13.376Z
Learning: Applies to solidity/**/*.sol : Check the contract inheritance hierarchy before implementing new Solidity contracts

Applied to files:

  • solidity/interface.sh
📚 Learning: 2025-08-26T13:46:37.695Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: rust/main/config/mainnet_config.json:965-965
Timestamp: 2025-08-26T13:46:37.695Z
Learning: In the repository hyperlane-xyz/hyperlane-monorepo, skip reviewing the file rust/main/config/testnet_config.json in future code reviews as requested by paulbalaji.

Applied to files:

  • solidity/interface.sh
🪛 Shellcheck (0.11.0)
solidity/interface.sh

[warning] 135-135: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (68)
  • GitHub Check: coverage-run
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-5)
  • GitHub Check: cli-evm-e2e-matrix (warp-init)
  • GitHub Check: cli-evm-e2e-matrix (warp-read)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-3)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-4)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-recovery)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-submitters)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-basic)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-simple-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-rebalancer)
  • GitHub Check: cli-evm-e2e-matrix (warp-send)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ism-updates)
  • GitHub Check: cli-evm-e2e-matrix (core-init)
  • GitHub Check: cli-evm-e2e-matrix (core-apply)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-hook-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cli-evm-e2e-matrix (status)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-rebalancing-config)
  • GitHub Check: cli-evm-e2e-matrix (relay)
  • GitHub Check: cli-evm-e2e-matrix (core-read)
  • GitHub Check: cli-evm-e2e-matrix (core-deploy)
  • GitHub Check: cli-evm-e2e-matrix (core-check)
  • GitHub Check: cli-radix-e2e-matrix (core-deploy)
  • GitHub Check: env-test-matrix (mainnet3, optimism, igp)
  • GitHub Check: env-test-matrix (testnet4, sepolia, core)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, core)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, igp)
  • GitHub Check: cli-cosmos-e2e-matrix (core-apply)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, igp)
  • GitHub Check: cli-cosmos-e2e-matrix (core-deploy)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, core)
  • GitHub Check: env-test-matrix (mainnet3, optimism, core)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (core-read)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-route-extension)
  • GitHub Check: cli-radix-e2e-matrix (warp-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (core-check)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cli-radix-e2e-matrix (core-apply)
  • GitHub Check: cosmos-sdk-e2e-run
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-apply)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-read)
  • GitHub Check: aleo-sdk-e2e-run
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-deploy)
  • GitHub Check: pnpm-test-run
  • GitHub Check: cli-install-test-run
  • GitHub Check: infra-test
  • GitHub Check: build-and-push-to-gcr
  • GitHub Check: fork-tests
  • GitHub Check: e2e-matrix (evm)
  • GitHub Check: agent-configs (mainnet3)
  • GitHub Check: lint-prettier
  • GitHub Check: agent-configs (testnet4)
  • GitHub Check: lint-rs
  • GitHub Check: lander-coverage
  • GitHub Check: test-rs
  • GitHub Check: diff-check
  • GitHub Check: diff-check
  • GitHub Check: diff-check
  • GitHub Check: slither

Comment thread solidity/interface.sh
Comment thread solidity/interface.sh
@hyper-gonk
Copy link
Copy Markdown
Contributor

hyper-gonk Bot commented Dec 19, 2025

🐳 Monorepo Docker Image Built Successfully

Image Tags:

gcr.io/abacus-labs-dev/hyperlane-monorepo:pr-7597
gcr.io/abacus-labs-dev/hyperlane-monorepo:1df012a-20251219-233914

@larryob larryob added this pull request to the merge queue Dec 20, 2025
Merged via the queue into main with commit 0499c81 Dec 20, 2025
101 checks passed
@larryob larryob deleted the interface-checker branch December 20, 2025 00:55
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Hyperlane Tasks Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants