Skip to content

feat: unify warp route checks onto shared logic#8554

Merged
paulbalaji merged 22 commits intomainfrom
pbio/warp-check-cli-shared
Apr 10, 2026
Merged

feat: unify warp route checks onto shared logic#8554
paulbalaji merged 22 commits intomainfrom
pbio/warp-check-cli-shared

Conversation

@paulbalaji
Copy link
Copy Markdown
Collaborator

@paulbalaji paulbalaji commented Apr 9, 2026

Summary

  • move warp route comparison onto the shared SDK helper used by the CLI and infra warp-check wrappers
  • keep infra check-warp-deploy on the shared checker while restoring getter-aware expected configs for routes backed by warpConfigGetterMap
  • add shared coverage for explicit proxyAdmin.address mismatches and ownerOverrides ownership checks
  • preserve non-EVM router entries while checking EVM chains so mixed-VM routes do not get false remote-router diffs
  • remove warp from the generic infra module / check-deploy / deploy surfaces
  • hard cut over the SDK by removing the legacy HypERC20App and HypERC20Checker exports and implementation
  • skip CLI version checks in CI / when HYPERLANE_SKIP_VERSION_CHECK=1 is set

Testing

  • pnpm -C typescript/sdk check
  • NODE_OPTIONS='--import tsx/esm' pnpm -C typescript/sdk exec hardhat --config hardhat.config.cts test ./src/token/deploy.hardhat-test.ts --grep 'checkWarpRouteDeployConfig'
  • pnpm -C typescript/infra check

Note

High Risk
High because it replaces legacy Warp checking/deploy surfaces and removes public SDK exports (HypERC20App/HypERC20Checker), which can break downstream integrations and subtly change on-chain config comparison behavior.

Overview
Warp route checking is replaced with a shared SDK-based comparator (checkWarpRouteDeployConfig) that returns structured diffs/violations used by both the CLI warp check and the infra check-warp-deploy cron.

The new check adds explicit proxyAdmin.address mismatch detection and owner override ownership checks (e.g., collateral token/proxy admin owners), improves mixed-VM route handling (avoid false remote-router diffs while still validating scale across route members), and tweaks config expansion to preserve proxyAdmin fields and optionally skip scale validation.

Infra tooling is simplified by removing WARP from generic deploy/check-deploy module flows and refactoring warp config loading to be registry/getter-aware; the SDK makes a major breaking change by removing HypERC20App/HypERC20Checker exports/implementation and exporting the new warp check API. CLI also skips version checks in CI or when HYPERLANE_SKIP_VERSION_CHECK=1.

Reviewed by Cursor Bugbot for commit 1f87bf2. Bugbot is set up for automated code reviews on this repo. Configure here.


Open with Devin

cursor[bot]

This comment was marked as resolved.

@paulbalaji paulbalaji changed the title Unify warp route checks onto shared CLI logic fix(warp): unify warp route checks onto shared CLI logic Apr 9, 2026
cursor[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

@paulbalaji paulbalaji changed the title fix(warp): unify warp route checks onto shared CLI logic feat: unify warp route checks onto shared CLI logic Apr 9, 2026
@paulbalaji paulbalaji changed the title feat: unify warp route checks onto shared CLI logic feat: unify warp route checks onto shared logic Apr 9, 2026
@paulbalaji paulbalaji marked this pull request as ready for review April 9, 2026 15:56
cursor[bot]

This comment was marked as resolved.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 9, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Warp route validation was refactored from a governor/checker workflow to a registry-driven validator (checkWarpRouteDeployConfig). CLI, infra scripts, and SDK now load configs from registries and call the new validator; legacy HypERC20App/HypERC20Checker and Warp governor branches were removed.

Changes

Cohort / File(s) Summary
Warp Validation Core
typescript/sdk/src/token/warpCheck.ts
New module: checkWarpRouteDeployConfig — builds per-chain diffs, resolves owner overrides (including proxyAdmin), computes scale violations, and exports types/constants (WARP_ROUTE_CHECK_*, WarpRouteCheckResult, WarpRouteCheckViolation).
SDK Export & Legacy Removal
typescript/sdk/src/index.ts, typescript/sdk/src/token/app.ts, typescript/sdk/src/token/checker.ts, typescript/sdk/src/token/checker.test.ts
Removed HypERC20App/HypERC20Checker implementations and tests; SDK index now exports warp-check APIs/types from warpCheck.ts.
CLI Integration
typescript/cli/src/check/warp.ts, typescript/cli/src/commands/warp.ts, typescript/cli/cli.ts
runWarpRouteCheck now accepts WarpRouteCheckResult; warp command delegates to checkWarpRouteDeployConfig; version check is skipped in CI or when HYPERLANE_SKIP_VERSION_CHECK=1.
Registry-backed Config Loaders
typescript/infra/config/warp.ts
Added exported getWarpDeployConfigFromMergedRegistry and getWarpConfigGetterInputs; getWarpConfig can accept precomputed getter inputs and uses registry path when appropriate.
Infra Check & Deploy Scripts
typescript/infra/scripts/check/check-utils.ts, typescript/infra/scripts/check/check-deploy.ts, typescript/infra/scripts/check/check-warp-deploy.ts, typescript/infra/scripts/deploy.ts
Removed Warp governor branch and forceRegistryConfig flag; added direct registry loading, route filtering, and direct calls to checkWarpRouteDeployConfig; deploy pipeline no longer propagates warp route-id.
Agent/Module Cleanup
typescript/infra/scripts/agent-utils.ts
Removed Modules.WARP enum member and related references.
Config Utilities & Tests
typescript/sdk/src/token/configUtils.ts, typescript/sdk/src/token/configUtils.test.ts
expandWarpDeployConfig now resolves proxyAdmin.owner from ownerOverrides when present; transformer preserves proxyAdmin.address/owner; added test asserting proxyAdmin address retention.
Test Migration
typescript/sdk/src/token/deploy.hardhat-test.ts
Replaced HypERC20 checker-driven tests with direct checkWarpRouteDeployConfig assertions and updated scenarios/violation inspections.
Misc/Changeset
.changeset/real-bugs-dance.md
Recorded release bumps and noted consolidated warp validation changes and removal of legacy SDK exports.
CLI Version Check
typescript/cli/cli.ts
Version check now skipped in CI or when HYPERLANE_SKIP_VERSION_CHECK=1.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant CLI
participant Infra as "Infra Scripts"
participant Registry
participant MultiProvider as "MultiProvider / Chain Readers"
participant SDK as "SDK: checkWarpRouteDeployConfig"
CLI->>Infra: invoke warp check command
Infra->>Registry: fetch warpCoreConfig & warpDeployConfig
Infra->>MultiProvider: provide per-chain providers
Infra->>SDK: call checkWarpRouteDeployConfig(multiProvider, warpCoreConfig, warpDeployConfig)
SDK->>MultiProvider: read on-chain route state (EVM & non-EVM readers)
SDK->>SDK: expand/normalize configs, resolve owner overrides, build diffs, verify scale
SDK-->>Infra: return WarpRouteCheckResult { diff, isValid, violations, scaleViolations }
Infra-->>CLI: print YAML/table, exit non-zero if !isValid

Possibly related issues

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.71% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: unify warp route checks onto shared logic' directly summarizes the main change: consolidating warp route validation onto a shared SDK helper used across CLI and infra.
Description check ✅ Passed The PR description covers all key sections: summary of consolidation work, backward compatibility implications (SDK breaking changes), and testing instructions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@paulbalaji paulbalaji added this pull request to the merge queue Apr 10, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

@paulbalaji paulbalaji removed this pull request from the merge queue due to a manual request Apr 10, 2026
cursor[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 18 additional findings in Devin Review.

Open in Devin Review

Comment thread typescript/infra/scripts/check/check-warp-deploy.ts
Copy link
Copy Markdown
Collaborator Author

Compared current HEAD 1f87bf2791d0 against 8690190e3381, where xeno last approved.

This post-approval delta stayed checker-scoped, not a broad PR expansion.

  • 10 commits, 7 TypeScript files, 466 insertions / 119 deletions
  • No Solidity, Rust, CLI, or deploy transaction logic changes
  • Biggest edits are typescript/infra/scripts/check/check-warp-deploy.ts and typescript/sdk/src/token/warpCheck.ts
  • typescript/sdk/src/token/deploy.hardhat-test.ts accounts for 156 added lines of regression coverage

Net behavior changes in the range:

  • infra warp check now preloads/reuses getter-backed configs and scopes the checker MultiProvider to the actual route/core chain set
  • SDK warp check now reports scale mismatches structurally instead of throwing early, ignores unknown core-config chains, preserves non-EVM members for scale validation, rejects pure non-EVM subsets, and skips collateral override checks for non-Ownable collateral tokens

The only meaningful ops-semantic change after approval is that config getter/load failures are now surfaced and fail the job at the end instead of being silently skipped.

So I would characterize the post-approval delta as targeted warp-check follow-up fixes, not a drastic PR mutation.

@paulbalaji paulbalaji added this pull request to the merge queue Apr 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 10, 2026
@paulbalaji paulbalaji added this pull request to the merge queue Apr 10, 2026
Merged via the queue into main with commit 69e6b3f Apr 10, 2026
125 checks passed
@paulbalaji paulbalaji deleted the pbio/warp-check-cli-shared branch April 10, 2026 16:00
@github-project-automation github-project-automation Bot moved this from In Review to Done in Hyperlane Tasks Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants