Skip to content

feat: add standalone warp-monitor package with Docker image#7653

Merged
paulbalaji merged 22 commits intomainfrom
feat/standalone-warp-monitor
Dec 30, 2025
Merged

feat: add standalone warp-monitor package with Docker image#7653
paulbalaji merged 22 commits intomainfrom
feat/standalone-warp-monitor

Conversation

@paulbalaji
Copy link
Collaborator

@paulbalaji paulbalaji commented Dec 18, 2025

Summary

  • Add standalone Docker image for warp-monitor using ncc bundling
  • Achieves 28x image size reduction vs monorepo image
  • Add GitHub Actions workflow to build and push to GCR
  • Update Helm chart to use standalone warp-monitor image
  • Prometheus metrics are 100% compatible with existing Grafana dashboards

Image Size Comparison

Image Size Reduction
Monorepo 6.39 GB -
Warp Monitor 227 MB 28x smaller 🎉

Production Impact

With 181 warp monitors running across 19 nodes in mainnet3:

  • 117 GB of node disk space freed (19 nodes × 6.16 GB saved per node)
  • 28x faster image pulls - pod startup drops from ~60s to ~2-3s
  • Reduced GCR storage costs - storing 227 MB instead of 6.39 GB per tag
  • Less network transfer - faster deployments, less egress when pulling images

Approach

Uses @vercel/ncc to bundle the warp-monitor into a single file with all dependencies, then runs on a minimal Alpine image. This eliminates the need for pnpm/node_modules in the final image.

Follows the same pattern as the rebalancer standalone image (#7545).

Changes

New Package: @hyperlane-xyz/warp-monitor

  • typescript/warp-monitor/ - New standalone package
  • typescript/warp-monitor/Dockerfile - Multi-stage Docker build with ncc bundling
  • typescript/warp-monitor/package.json - Added ncc and bundle script
  • typescript/warp-monitor/scripts/ncc.post-bundle.mjs - Post-bundle __dirname fix
  • typescript/warp-monitor/turbo.json - Bundle task
  • typescript/warp-monitor/src/service.ts - Service entry point using env vars:
    • WARP_ROUTE_ID - Required
    • REGISTRY_URI - Optional, supports /tree/{commit} format
    • CHECK_FREQUENCY - Optional (default 30000ms)
    • COINGECKO_API_KEY - Optional

CI/CD

  • .github/workflows/warp-monitor-docker.yml - CI workflow for building/pushing

Helm Chart Updates

  • typescript/infra/helm/warp-routes/ - Updated to use standalone image and env vars
  • Uses gcr.io/abacus-labs-dev/hyperlane-warp-monitor
  • Uses registryUri instead of registryCommit

Cleanup

  • Removed old monitor scripts from typescript/infra/scripts/warp-routes/monitor/

Metrics Compatibility

All Prometheus metrics are 100% identical to the old implementation:

  • hyperlane_warp_route_token_balance
  • hyperlane_warp_route_collateral_value
  • hyperlane_warp_route_value_at_risk
  • hyperlane_wallet_balance
  • hyperlane_xerc20_limits

Grafana dashboards will work seamlessly without changes.

Test plan

  • pnpm install succeeds
  • pnpm lint:catalog passes
  • pnpm build succeeds
  • Docker build succeeds in CI
  • Live testing with oUSDT/production route - metrics collected across 24+ chains
  • Helm chart deploys correctly

🐳 Standalone Image Initiative

This PR is part of a wider effort to migrate TypeScript workloads from the 6.39 GB monorepo image to lightweight standalone images:

PR Workload Pods Nodes Standalone Size Reduction
#7545 Rebalancer 11 7 227 MB 28x
#7565 Offchain Lookup Server 1 1 1.64 GB 4x
#7653 Warp Monitor 181 19 227 MB 28x
Total - 193 20* - -

*20 unique nodes (some overlap between workloads)

Total Infrastructure Savings

  • ~121 GB node disk freed across the cluster
  • Before: 20 nodes × 6.45 GB = 129 GB cached monorepo images
  • After: ~8 GB total standalone images
  • 28x faster pod startup for most workloads
  • Reduced GCR costs from smaller storage and less transfer

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced Warp Monitor service that periodically collects and exports metrics for Warp Routes, including token balances, valuations, and xERC20 limits.
    • Added automated Docker image build and deployment workflow with support for multi-platform builds.
    • Enhanced Helm configuration for Warp Routes with environment-based monitoring and optional registry support.
  • Chores

    • Updated deployment infrastructure and removed legacy monitoring scripts.

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

Greptile Summary

  • Creates new standalone @hyperlane-xyz/warp-monitor package with Docker image that reduces deployment size from 6.39 GB to 227 MB (28x reduction) using ncc bundling, targeting 181 warp monitor pods across 19 nodes for significant infrastructure savings
  • Adds CI/CD pipeline via GitHub Actions and updates Helm charts to use new standalone image with environment variable configuration instead of monorepo execution pattern
  • Removes legacy monitoring scripts from typescript/infra/scripts/warp-routes/monitor/ while maintaining 100% Prometheus metrics compatibility with existing Grafana dashboards

Important Files Changed

Filename Overview
typescript/warp-monitor/src/monitor.ts New WarpMonitor class with comprehensive monitoring logic; early returns in xERC20 handling may impact extra lockbox visibility
typescript/warp-monitor/src/metrics.ts Moved metrics functionality with HTTP server; wallet balance gauge name mismatch with Rust implementation needs attention
typescript/warp-monitor/Dockerfile Multi-stage Docker build using ncc bundling; proper error handling and minimal Alpine runtime image
typescript/infra/helm/warp-routes/templates/_helpers.tpl Complete migration from script execution to environment variable configuration for standalone deployment
.github/workflows/warp-monitor-docker.yml New CI pipeline for building standalone images; includes proper concurrency and multi-platform support

Confidence score: 4/5

  • This PR requires careful review due to significant architectural changes and potential metric compatibility issues
  • Score reflects well-structured implementation but concerns about early returns in xERC20 monitoring, metric name mismatches, and the scope of infrastructure changes
  • Pay close attention to typescript/warp-monitor/src/monitor.ts and typescript/warp-monitor/src/metrics.ts for monitoring logic correctness and Prometheus metric compatibility

Sequence Diagram

sequenceDiagram
    participant User
    participant Service as "Warp Monitor Service"
    participant Registry
    participant WarpMonitor
    participant MetricsServer as "Metrics Server"
    participant WarpCore
    participant CoinGecko as "CoinGecko API"
    participant TokenAdapter as "Token Adapters"
    participant PrometheusClient as "Prometheus Client"

    User->>Service: "Start warp monitor service"
    Service->>Service: "Parse environment variables"
    Service->>Registry: "Initialize registry"
    Registry-->>Service: "Registry instance"
    
    Service->>WarpMonitor: "Create monitor instance"
    WarpMonitor->>MetricsServer: "Start metrics server on port 9090"
    MetricsServer-->>WarpMonitor: "Server started"
    
    WarpMonitor->>Registry: "Get chain metadata and addresses"
    Registry-->>WarpMonitor: "Chain data"
    
    WarpMonitor->>Registry: "Get warp route config"
    Registry-->>WarpMonitor: "Warp route config"
    
    WarpMonitor->>WarpCore: "Create WarpCore from config"
    WarpCore-->>WarpMonitor: "WarpCore instance"
    
    loop "Every CHECK_FREQUENCY interval"
        WarpMonitor->>WarpCore: "Get tokens from warp route"
        WarpCore-->>WarpMonitor: "Token list"
        
        loop "For each token"
            WarpMonitor->>TokenAdapter: "Get bridged balance"
            TokenAdapter-->>WarpMonitor: "Balance data"
            
            WarpMonitor->>CoinGecko: "Get token price"
            CoinGecko-->>WarpMonitor: "USD price"
            
            WarpMonitor->>PrometheusClient: "Update token balance metrics"
            
            alt "Token is xERC20"
                WarpMonitor->>TokenAdapter: "Get xERC20 limits"
                TokenAdapter-->>WarpMonitor: "Mint/burn limits"
                WarpMonitor->>PrometheusClient: "Update xERC20 limit metrics"
            end
            
            alt "Token is Sealevel"
                WarpMonitor->>TokenAdapter: "Get ATA payer balance"
                TokenAdapter-->>WarpMonitor: "Native balance"
                WarpMonitor->>PrometheusClient: "Update wallet balance metrics"
            end
        end
    end
Loading

Context used:

  • Context from dashboard - CLAUDE.md (source)

- Create new @hyperlane-xyz/warp-monitor package with:
  - Service entry point using env vars (WARP_ROUTE_ID, REGISTRY_URI, etc.)
  - Prometheus metrics on port 9090
  - ncc bundling for minimal Docker image size
  - Multi-stage Dockerfile for standalone deployment

- Update Helm chart to use new standalone image:
  - Use gcr.io/abacus-labs-dev/hyperlane-warp-monitor
  - Configure via REGISTRY_URI with /tree/{commit} format
  - Remove args-based script invocation

- Add GitHub Actions workflow for building and pushing images

- Remove old monitor scripts from infra package

- Add @vercel/ncc to pnpm catalog

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

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

changeset-bot bot commented Dec 18, 2025

⚠️ No Changeset found

Latest commit: e1aa971

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

paulbalaji and others added 5 commits December 18, 2025 22:51
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add tests for metrics module (updateTokenBalanceMetrics, updateNativeWalletBalanceMetrics, updateXERC20LimitsMetrics)
- Add tests for utils module (getLogger, setLoggerBindings, tryFn)
- Add tests for types module (type validation)
- Add chai, sinon dev dependencies for testing

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add comprehensive tests for Prometheus metrics recording
- Verify metrics include correct labels (chain_name, token_name, etc.)
- Test xERC20 limit types and bridge address labels
- Remove unused sinon imports
- Fix tsconfig.json to include test files

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

coderabbitai bot commented Dec 18, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

This PR consolidates Warp Monitor logic from separate scripts into a unified TypeScript service package with metrics, Kubernetes integration, and Docker containerization. Updates Helm values and infrastructure code to use the new warp-monitor image and registry configuration. Adds CI/CD workflow for building and publishing the Warp Monitor Docker image.

Changes

Cohort / File(s) Summary
GitHub Actions CI/CD
.github/workflows/warp-monitor-docker.yml
Introduces workflow for building, tagging, and pushing Warp Monitor Docker image to GCR. Supports ARM64 via workflow dispatch input, handles PR comments with image tags, and gates to environments with secrets present.
Warp Monitor Core Implementation
typescript/warp-monitor/src/service.ts, typescript/warp-monitor/src/monitor.ts, typescript/warp-monitor/src/types.ts, typescript/warp-monitor/src/utils.ts, typescript/warp-monitor/src/metrics.ts
New service entry point, WarpMonitor orchestration class, type definitions, logging utilities, and metrics integration. Handles polling loop, token metric updates, CoinGecko pricing, and xERC20/lockbox balance tracking.
Warp Monitor Tests
typescript/warp-monitor/src/metrics.test.ts, typescript/warp-monitor/src/types.test.ts, typescript/warp-monitor/src/utils.test.ts
Test suites covering metrics registration, token/wallet balance updates, xERC20 limits, type validation, and utility functions.
Warp Monitor Configuration & Build
typescript/warp-monitor/package.json, typescript/warp-monitor/tsconfig.json, typescript/warp-monitor/turbo.json, typescript/warp-monitor/.mocharc.json, typescript/warp-monitor/eslint.config.mjs, typescript/warp-monitor/scripts/ncc.post-bundle.mjs, typescript/warp-monitor/.gitignore, typescript/warp-monitor/Dockerfile
Manifest, TypeScript compilation, Turborepo task config, Mocha/ESLint setup, post-bundle shebang injection, and multi-stage Docker build producing production-ready warp-monitor image.
Helm Warp Routes Configuration
typescript/infra/helm/warp-routes/templates/_helpers.tpl, typescript/infra/helm/warp-routes/values.yaml
Refactors container env variables from CLI-based monitor invocation to environment-driven config. Replaces image repository and registry commit with optional registry URI. Introduces LOG_LEVEL, WARP_ROUTE_ID, CHECK_FREQUENCY, COINGECKO_API_KEY.
Helm Infrastructure
typescript/infra/src/warp/helm.ts
Adds DEFAULT_GITHUB_REGISTRY import and registryUri getter. Updates Helm values to reference new warp-monitor image with registry URI instead of commit pinning.
Deleted Monitoring Scripts
typescript/infra/scripts/warp-routes/monitor/monitor-warp-route-balances.ts, typescript/infra/scripts/warp-routes/monitor/status.ts, typescript/infra/scripts/warp-routes/monitor/utils.ts
Removes legacy CLI-based monitor scripts, status check utility, and logging setup—functionality consolidated into new warp-monitor service package.
Docker & Build Utilities
Dockerfile, scripts/check-package-json.sh
Adds warp-monitor package.json to Docker build context for dependency installation. Introduces excluded packages check to skip COPY verification for warp-monitor.

Sequence Diagram(s)

sequenceDiagram
    participant Service as Warp Monitor<br/>Service
    participant Monitor as WarpMonitor<br/>Class
    participant Registry as Registry<br/>Fetcher
    participant Chain as Chain<br/>Metadata
    participant Core as WarpCore
    participant Metrics as Metrics<br/>Server
    participant CoinGecko as CoinGecko<br/>API

    Service->>Service: Parse env (WARP_ROUTE_ID,<br/>CHECK_FREQUENCY, etc.)
    Service->>Service: Initialize logger
    Service->>Monitor: Create WarpMonitor<br/>(config)
    
    Monitor->>Monitor: start()
    Monitor->>Registry: Fetch registry config
    Registry-->>Monitor: Chain metadata & addresses
    Monitor->>Core: Build WarpCore
    Monitor->>Core: Load WarpDeployConfig
    
    rect rgb(100, 150, 200)
    Note over Monitor,Metrics: Polling Loop (every checkFrequency ms)
    end
    
    loop For each token in WarpRoute
        Monitor->>Core: Get token & adapters
        Monitor->>Monitor: updateTokenMetrics()
        
        alt EVM Token
            Monitor->>Monitor: Get bridged balance
            Monitor->>CoinGecko: Fetch token price
            CoinGecko-->>Monitor: Price or undefined
        end
        
        alt Sealevel Token
            Monitor->>Monitor: Get ATA payer balance
        end
        
        alt xERC20 Token
            Monitor->>Core: Get XERC20 adapter
            Monitor->>Monitor: Retrieve limits<br/>(mint/burn/max)
            Monitor->>Monitor: Check lockbox collateral
            Monitor->>CoinGecko: Price for collateral
            CoinGecko-->>Monitor: Collateral value
        end
        
        Monitor->>Metrics: Update token balance<br/>gauge
        Monitor->>Metrics: Update value@risk<br/>gauge
        Monitor->>Metrics: Update limits<br/>gauge (xERC20)
    end
    
    Monitor->>Metrics: Poll complete<br/>Metrics exported
    Metrics-->>Service: /metrics endpoint
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

The changes introduce a complete new TypeScript service package with intricate monitoring logic, multiple test suites, Docker/Helm infrastructure, and CI/CD workflows. Dense logic in monitor.ts involving WarpCore interactions, price fetching, and xERC20/lockbox handling requires careful review. Understanding the metrics data flow, Helm template changes, and Docker build stages adds cognitive load beyond straightforward refactoring.

Possibly related PRs

Suggested reviewers

  • Mo-Hussain
  • antigremlin
  • ltyu
  • yorhodes
  • Xaroz

Poem

🧅 Once scattered like ogres in swamps all about,
These monitor scripts got a refactoring route—
Now layered in service code, metrics run deep,
With Docker containers where data can sleep,
A refactor that's better than fairy tales, aye! 🐉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 8.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive The description is comprehensive, covering the purpose, approach, changes, and impacts. However, it lacks proper formatting against the template structure with required sections like Description, Drive-by changes, Related issues, Backward compatibility, and Testing. Restructure the PR description to match the required template sections (Description, Drive-by changes, Related issues, Backward compatibility, Testing) while preserving the detailed content already provided.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a standalone warp-monitor package with Docker image. It directly relates to the primary focus of the changeset.
✨ 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 feat/standalone-warp-monitor

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ef0fed7 and e1aa971.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • typescript/infra/src/warp/helm.ts
🧰 Additional context used
📓 Path-based instructions (1)
typescript/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

typescript/**/*.{ts,tsx}: Use ChainMap for per-chain configurations in TypeScript
Import types from @hyperlane-xyz/sdk when using TypeScript SDK types

Files:

  • typescript/infra/src/warp/helm.ts
🧠 Learnings (5)
📓 Common learnings
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/mainnet_config.json in future code reviews as requested by paulbalaji.
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.
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7545
File: typescript/infra/src/rebalancer/helm.ts:82-83
Timestamp: 2025-12-29T19:45:12.592Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, Docker image tags in Helm managers (e.g., typescript/infra/src/rebalancer/helm.ts) are intentionally hardcoded for reproducibility and explicit version control, rather than using dynamically generated CI tags.
📚 Learning: 2025-12-29T19:45:12.592Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7545
File: typescript/infra/src/rebalancer/helm.ts:82-83
Timestamp: 2025-12-29T19:45:12.592Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, Docker image tags in Helm managers (e.g., typescript/infra/src/rebalancer/helm.ts) are intentionally hardcoded for reproducibility and explicit version control, rather than using dynamically generated CI tags.

Applied to files:

  • typescript/infra/src/warp/helm.ts
📚 Learning: 2025-06-16T11:17:55.750Z
Learnt from: xeno097
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6486
File: typescript/cli/src/tests/warp/warp-check.e2e-test.ts:490-494
Timestamp: 2025-06-16T11:17:55.750Z
Learning: In the Hyperlane registry, the label part of warp IDs can now be any value that matches the registry's regex requirements, not just actual chain names. This means functions like getCombinedWarpRoutePath can accept descriptive filenames like WARP_DEPLOY_DEFAULT_FILE_NAME as valid label components for constructing registry paths.

Applied to files:

  • typescript/infra/src/warp/helm.ts
📚 Learning: 2025-11-26T13:28:51.658Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7410
File: typescript/cli/package.json:20-20
Timestamp: 2025-11-26T13:28:51.658Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, hyperlane-xyz/registry is maintained in a separate repository and published to npm, so it should use a pinned version (e.g., "23.6.0") rather than the workspace protocol ("workspace:*") that other internal Hyperlane packages use.

Applied to files:

  • typescript/infra/src/warp/helm.ts
📚 Learning: 2025-08-13T16:53:55.163Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6891
File: typescript/infra/config/environments/mainnet3/funding.ts:22-22
Timestamp: 2025-08-13T16:53:55.163Z
Learning: In Hyperlane mainnet3 configs, funding.ts uses 'gcr.io/abacus-labs-dev/hyperlane-monorepo' docker image while agent.ts uses 'gcr.io/abacus-labs-dev/hyperlane-agent' docker image. These are different images with independent tag cycles, so tag consistency across them is not expected.

Applied to files:

  • typescript/infra/src/warp/helm.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). (61)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-read)
  • GitHub Check: cli-evm-e2e-matrix (warp-send)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-4)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-5)
  • GitHub Check: cli-evm-e2e-matrix (warp-init)
  • 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-bridge-1)
  • GitHub Check: cli-evm-e2e-matrix (status)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-submitters)
  • 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-apply-ism-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-3)
  • GitHub Check: cli-evm-e2e-matrix (warp-rebalancer)
  • GitHub Check: cli-evm-e2e-matrix (core-deploy)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-rebalancing-config)
  • GitHub Check: cli-evm-e2e-matrix (core-apply)
  • GitHub Check: cli-evm-e2e-matrix (core-init)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-hook-updates)
  • GitHub Check: cli-evm-e2e-matrix (core-check)
  • GitHub Check: cli-evm-e2e-matrix (relay)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-simple-updates)
  • GitHub Check: cli-evm-e2e-matrix (core-read)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, igp)
  • GitHub Check: env-test-matrix (mainnet3, optimism, core)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cli-radix-e2e-matrix (warp-deploy)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, core)
  • GitHub Check: cli-radix-e2e-matrix (core-apply)
  • GitHub Check: cli-radix-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, optimism, igp)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-route-extension)
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-deploy)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, core)
  • GitHub Check: cli-cosmos-e2e-matrix (core-read)
  • GitHub Check: cli-cosmos-e2e-matrix (core-check)
  • GitHub Check: cli-cosmos-e2e-matrix (core-apply)
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-apply)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-read)
  • GitHub Check: cli-cosmos-e2e-matrix (core-deploy)
  • GitHub Check: cosmos-sdk-e2e-run
  • GitHub Check: cli-cosmos-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: build-and-push-to-gcr
  • GitHub Check: e2e-matrix (evm)
  • GitHub Check: agent-configs (mainnet3)
  • GitHub Check: lint-rs
  • GitHub Check: test-rs
  • GitHub Check: lander-coverage
🔇 Additional comments (1)
typescript/infra/src/warp/helm.ts (1)

111-111: Good switch to registryUri.

Passin' the full registry URI instead of just the commit makes sense for the standalone warp-monitor package. It can now use the URI directly without needin' to reconstruct it, which aligns with the Helm template changes mentioned in the PR.


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
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 (3)
typescript/warp-monitor/src/types.test.ts (1)

1-97: Type tests provide good documentation value.

While TypeScript's compiler already validates type conformance, these tests serve as useful living documentation showing how to construct each type. They're particularly helpful for the optional fields examples (lines 26-33, 87-95).

That said, if you're lookin' to trim test execution time down the road, these could be candidates for skipping since the compiler does most of the heavy lifting here.

typescript/warp-monitor/scripts/ncc.post-bundle.mjs (1)

31-36: String manipulation could be more robust.

The current approach splits on the shebang string (line 32), which assumes the shebang only appears once at the beginning. If the shebang text somehow appears in the bundled code (unlikely but possible in strings or comments), this could incorrectly split the content.

A safer approach would be to slice based on the shebang length:

🔎 More robust string handling
    if (!content.includes(dirnameDef)) {
-     const [, executable] = content.split(shebang);
-     const newContent = `${shebang}\n${dirnameDef}\n${executable}`;
+     const afterShebang = content.slice(shebang.length);
+     const newContent = `${shebang}\n${dirnameDef}${afterShebang}`;
      await writeFile(outputFile, newContent, 'utf8');
      console.log('Adding missing __dirname definition to service executable');
    }

This avoids potential issues with the shebang string appearing elsewhere in the bundle.

typescript/warp-monitor/src/service.ts (1)

44-108: Main function is well-structured, like a proper onion with layers.

The validation, logging initialization, registry setup, and monitor startup are all nicely organized. Error handling exits with code 1 appropriately.

One thing that might be worth adding down the road - graceful shutdown handling for SIGTERM/SIGINT. When Kubernetes wants to evict the pod, it'd be nice to let the current metrics update finish before shutting down. Not a blocker though, the service will work fine without it.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7c0f651 and b85e6b5.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (27)
  • .github/workflows/warp-monitor-docker.yml (1 hunks)
  • Dockerfile (1 hunks)
  • pnpm-workspace.yaml (1 hunks)
  • typescript/cli/package.json (1 hunks)
  • typescript/infra/helm/warp-routes/templates/_helpers.tpl (1 hunks)
  • typescript/infra/helm/warp-routes/values.yaml (1 hunks)
  • typescript/infra/scripts/warp-routes/monitor/monitor-warp-route-balances.ts (0 hunks)
  • typescript/infra/scripts/warp-routes/monitor/status.ts (0 hunks)
  • typescript/infra/scripts/warp-routes/monitor/utils.ts (0 hunks)
  • typescript/infra/src/warp/helm.ts (3 hunks)
  • typescript/warp-monitor/.gitignore (1 hunks)
  • typescript/warp-monitor/.mocharc.json (1 hunks)
  • typescript/warp-monitor/Dockerfile (1 hunks)
  • typescript/warp-monitor/eslint.config.mjs (1 hunks)
  • typescript/warp-monitor/package.json (1 hunks)
  • typescript/warp-monitor/scripts/ncc.post-bundle.mjs (1 hunks)
  • typescript/warp-monitor/src/index.ts (1 hunks)
  • typescript/warp-monitor/src/metrics.test.ts (1 hunks)
  • typescript/warp-monitor/src/metrics.ts (10 hunks)
  • typescript/warp-monitor/src/monitor.ts (1 hunks)
  • typescript/warp-monitor/src/service.ts (1 hunks)
  • typescript/warp-monitor/src/types.test.ts (1 hunks)
  • typescript/warp-monitor/src/types.ts (2 hunks)
  • typescript/warp-monitor/src/utils.test.ts (1 hunks)
  • typescript/warp-monitor/src/utils.ts (1 hunks)
  • typescript/warp-monitor/tsconfig.json (1 hunks)
  • typescript/warp-monitor/turbo.json (1 hunks)
💤 Files with no reviewable changes (3)
  • typescript/infra/scripts/warp-routes/monitor/monitor-warp-route-balances.ts
  • typescript/infra/scripts/warp-routes/monitor/status.ts
  • typescript/infra/scripts/warp-routes/monitor/utils.ts
🧰 Additional context used
📓 Path-based instructions (1)
typescript/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

typescript/**/*.{ts,tsx}: Use ChainMap for per-chain configurations in TypeScript
Import types from @hyperlane-xyz/sdk when using TypeScript SDK types

Files:

  • typescript/warp-monitor/src/types.test.ts
  • typescript/warp-monitor/src/types.ts
  • typescript/warp-monitor/src/metrics.test.ts
  • typescript/warp-monitor/src/index.ts
  • typescript/warp-monitor/src/service.ts
  • typescript/warp-monitor/src/utils.ts
  • typescript/infra/src/warp/helm.ts
  • typescript/warp-monitor/src/utils.test.ts
  • typescript/warp-monitor/src/monitor.ts
  • typescript/warp-monitor/src/metrics.ts
🧠 Learnings (13)
📚 Learning: 2025-09-05T15:13:08.394Z
Learnt from: ltyu
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6992
File: typescript/sdk/src/token/types.test.ts:188-197
Timestamp: 2025-09-05T15:13:08.394Z
Learning: WarpRouteDeployConfigSchema.safeParse automatically populates missing token fields during preprocessing, so manual specification of top-level token fields in RoutingFee test cases is not necessary.

Applied to files:

  • typescript/warp-monitor/src/types.test.ts
  • typescript/warp-monitor/src/metrics.ts
📚 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 typescript/**/*.{ts,tsx} : Use `ChainMap` for per-chain configurations in TypeScript

Applied to files:

  • typescript/warp-monitor/src/types.ts
  • typescript/warp-monitor/tsconfig.json
  • typescript/warp-monitor/.mocharc.json
  • typescript/warp-monitor/turbo.json
📚 Learning: 2025-06-16T11:17:55.750Z
Learnt from: xeno097
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6486
File: typescript/cli/src/tests/warp/warp-check.e2e-test.ts:490-494
Timestamp: 2025-06-16T11:17:55.750Z
Learning: In the Hyperlane registry, the label part of warp IDs can now be any value that matches the registry's regex requirements, not just actual chain names. This means functions like getCombinedWarpRoutePath can accept descriptive filenames like WARP_DEPLOY_DEFAULT_FILE_NAME as valid label components for constructing registry paths.

Applied to files:

  • typescript/warp-monitor/src/types.ts
  • typescript/infra/src/warp/helm.ts
  • typescript/infra/helm/warp-routes/templates/_helpers.tpl
  • typescript/infra/helm/warp-routes/values.yaml
📚 Learning: 2025-08-26T13:45:52.227Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: rust/main/config/testnet_config.json:34-35
Timestamp: 2025-08-26T13:45:52.227Z
Learning: Skip reviewing mainnet_config.json and testnet_config.json configuration files in typescript/infra/config/ and rust/main/config/ directories as requested by paulbalaji to reduce review noise.

Applied to files:

  • typescript/warp-monitor/tsconfig.json
  • typescript/warp-monitor/.mocharc.json
  • typescript/warp-monitor/.gitignore
  • typescript/warp-monitor/turbo.json
📚 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 typescript/**/*.{ts,tsx} : Import types from `hyperlane-xyz/sdk` when using TypeScript SDK types

Applied to files:

  • typescript/warp-monitor/tsconfig.json
  • typescript/warp-monitor/.mocharc.json
  • Dockerfile
  • typescript/warp-monitor/package.json
📚 Learning: 2025-11-25T17:10:33.369Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7410
File: solidity/foundry.toml:8-8
Timestamp: 2025-11-25T17:10:33.369Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, when using pnpm (instead of Yarn), Foundry's `allow_paths` in solidity/foundry.toml should be set to `["./node_modules"]` rather than `["../node_modules"]` because pnpm's default node_modules structure places dependencies locally in the workspace subdirectory, not requiring access to the parent directory's node_modules.

Applied to files:

  • pnpm-workspace.yaml
  • typescript/warp-monitor/Dockerfile
  • typescript/warp-monitor/package.json
📚 Learning: 2025-07-11T10:06:07.854Z
Learnt from: Mo-Hussain
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6702
File: typescript/utils/src/logging.ts:75-93
Timestamp: 2025-07-11T10:06:07.854Z
Learning: In the hyperlane-xyz/utils package, pino-pretty is added as an optional peer dependency rather than a direct dependency, allowing consuming projects to decide if they want the pretty logging functionality without forcing all consumers to install it.

Applied to files:

  • typescript/warp-monitor/src/utils.ts
📚 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: Most deployments are config-driven; check `typescript/infra/config/` for deployment configuration examples

Applied to files:

  • Dockerfile
  • typescript/warp-monitor/turbo.json
📚 Learning: 2025-08-13T16:53:55.163Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6891
File: typescript/infra/config/environments/mainnet3/funding.ts:22-22
Timestamp: 2025-08-13T16:53:55.163Z
Learning: In Hyperlane mainnet3 configs, funding.ts uses 'gcr.io/abacus-labs-dev/hyperlane-monorepo' docker image while agent.ts uses 'gcr.io/abacus-labs-dev/hyperlane-agent' docker image. These are different images with independent tag cycles, so tag consistency across them is not expected.

Applied to files:

  • typescript/warp-monitor/Dockerfile
  • typescript/infra/src/warp/helm.ts
  • typescript/infra/helm/warp-routes/values.yaml
📚 Learning: 2025-11-26T13:28:51.658Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7410
File: typescript/cli/package.json:20-20
Timestamp: 2025-11-26T13:28:51.658Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, hyperlane-xyz/registry is maintained in a separate repository and published to npm, so it should use a pinned version (e.g., "23.6.0") rather than the workspace protocol ("workspace:*") that other internal Hyperlane packages use.

Applied to files:

  • typescript/infra/src/warp/helm.ts
  • typescript/warp-monitor/package.json
  • typescript/infra/helm/warp-routes/values.yaml
📚 Learning: 2025-09-15T17:15:41.014Z
Learnt from: xeno097
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7034
File: typescript/infra/config/environments/mainnet3/rebalancer/USDC/pulsechain.yaml:0-0
Timestamp: 2025-09-15T17:15:41.014Z
Learning: Bridge addresses for USDC warp routes in pulsechain.yaml configurations should reference the canonical addresses from the hyperlane-registry repo's mainnet-cctp-config.yaml file rather than being generated independently.

Applied to files:

  • typescript/infra/helm/warp-routes/values.yaml
📚 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: Chain metadata lives in external `hyperlane-xyz/registry` package, not in the main repository

Applied to files:

  • typescript/infra/helm/warp-routes/values.yaml
📚 Learning: 2025-09-18T15:49:20.478Z
Learnt from: yorhodes
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6750
File: solidity/contracts/token/bridge/EverclearTokenBridge.sol:212-212
Timestamp: 2025-09-18T15:49:20.478Z
Learning: EverclearTokenBridge sends funds directly to recipients for ERC20 transfers, while EverclearEthBridge sends funds to remote routers that handle WETH unwrapping and ETH delivery. The virtual _getReceiver and _getIntentCalldata functions enable this architectural difference between the two bridge implementations.

Applied to files:

  • typescript/warp-monitor/src/metrics.ts
🧬 Code graph analysis (2)
typescript/warp-monitor/src/metrics.test.ts (1)
typescript/sdk/src/index.ts (1)
  • TokenStandard (732-732)
typescript/warp-monitor/src/utils.ts (1)
typescript/infra/src/infrastructure/monitoring/grafana.ts (1)
  • logger (14-14)
🔇 Additional comments (37)
typescript/warp-monitor/.mocharc.json (1)

1-3: Standard Mocha configuration looks good.

The tsx import enables TypeScript module support for tests, which is exactly what ya need here.

typescript/warp-monitor/tsconfig.json (1)

1-8: TypeScript configuration follows monorepo conventions.

Extends the shared config and sets up standard output/source directories. All looks proper.

pnpm-workspace.yaml (1)

97-97: Good move centralizing ncc version in the catalog.

This'll keep the version consistent across packages that use ncc for bundling.

typescript/warp-monitor/.gitignore (1)

1-4: Ignore patterns cover the necessary artifacts.

Environment files, build outputs, cache, and the ncc bundle are all properly excluded from version control.

typescript/cli/package.json (1)

39-39: Migration to catalog reference is consistent.

This aligns with the catalog entry added in pnpm-workspace.yaml, ensuring the CLI uses the same ncc version as other packages.

typescript/warp-monitor/eslint.config.mjs (1)

1-14: ESLint configuration is sensible for a Node.js service.

Extending the monorepo defaults and disabling the restricted imports rule makes sense when you're building a standalone Node.js service that needs direct access to built-ins.

typescript/warp-monitor/turbo.json (1)

1-9: Turborepo task configuration is set up properly.

The bundle task correctly depends on build and declares its outputs, which'll help Turbo cache things efficiently.

Dockerfile (1)

37-37: Warp-monitor package.json added in the right spot.

Follows the same pattern as other packages and maintains alphabetical ordering. This'll let pnpm install the warp-monitor dependencies during the Docker build.

typescript/infra/helm/warp-routes/values.yaml (2)

2-2: Nice upgrade to the standalone image.

The switch to the dedicated warp-monitor image makes sense and should significantly reduce the image size (from 6.39 GB to 227 MB as noted in the PR). This looks good.


8-8: Registry URI pattern looks solid.

The shift from registryCommit to registryUri with an optional empty default aligns well with the new configuration approach. This allows for flexible registry pinning.

typescript/warp-monitor/src/types.ts (2)

1-2: Good use of type-only imports.

Using import type for ChainName and Address is the right approach here since these are used purely at the type level, which can help with tree-shaking and build optimization.


24-29: WarpMonitorConfig interface looks well-designed.

The configuration interface covers all the essential service parameters mentioned in the PR objectives. The optional fields (coingeckoApiKey and registryUri) provide good flexibility for different deployment scenarios.

typescript/infra/src/warp/helm.ts (1)

59-62: Registry URI construction looks proper.

Building the registry URI with the /tree/{commit} format using DEFAULT_GITHUB_REGISTRY provides a clean way to reference specific registry versions.

typescript/warp-monitor/src/utils.test.ts (1)

1-41: Utility tests cover the essentials.

The test coverage for logger and error handling utilities looks appropriate. The tryFn error test (lines 32-39) is particularly important since it validates that errors are caught and logged rather than propagated, which is the intended behavior.

typescript/warp-monitor/Dockerfile (2)

1-79: Dockerfile structure looks solid.

The multi-stage build with selective package copying and final bundle-only image is well done. The progression from node:20-slim (builder) to node:20-alpine (runner) gives you a good balance between build capabilities and final image size.

The 28x size reduction mentioned in the PR is impressive and this Dockerfile structure is a big part of that.


9-12: Remove Foundry installation from warp-monitor Dockerfile.

warp-monitor is a pure TypeScript service that doesn't compile Solidity. The build scripts only use tsc for TypeScript and ncc for bundling—no forge or soldeer references anywhere in the package or its dependencies. Foundry adds unnecessary bloat to the image and should be removed to speed up builds.

typescript/warp-monitor/src/metrics.test.ts (5)

19-20: Good documentation about registry behavior.

The note explaining why the registry isn't cleared between tests is helpful context. Since gauges are registered at module load time, this prevents potential issues with re-registration.


34-47: Clean mock helper functions.

The createMockWarpCore and createMockToken helpers keep the tests readable and avoid repetition. Nice approach.


132-159: Excellent test for related chains logic.

This test validates that the current chain is properly excluded from related_chain_names and that the remaining chains are sorted. This kind of specific label validation helps catch subtle metric bugs that could affect monitoring dashboards.


161-184: Good coverage of xERC20 labeling.

Verifying that xERC20 tokens get the correct token_standard="xERC20" label (rather than the internal EvmHypXERC20 enum name) is important for consistent metric naming. This ensures the Prometheus metrics match what Grafana dashboards expect.


1-304: Comprehensive metrics test coverage.

The test suite thoroughly validates all the metric update functions with good coverage of edge cases (zero limits, small balances, multi-chain scenarios). The tests serve as both validation and documentation for how metrics should be labeled and structured.

This will help ensure Prometheus metrics remain compatible with existing Grafana dashboards as noted in the PR objectives.

typescript/infra/helm/warp-routes/templates/_helpers.tpl (1)

73-84: Environment variable configuration looks proper, ogre-all.

The new env-based configuration is clean and straightforward. The conditional REGISTRY_URI and the secret reference for COINGECKO_API_KEY using $(COINGECKO_API_KEY) syntax are correctly set up for Kubernetes. Hardcoding CHECK_FREQUENCY to "30000" matches the default in the service code.

One small thing to ponder - if you ever need to tune CHECK_FREQUENCY or LOG_LEVEL per deployment, you might want to parameterize these via .Values too. But for now, this keeps things simple in your swamp.

typescript/warp-monitor/src/service.ts (1)

31-42: Version reading is solid, but watch out for bundled deployments.

When ncc bundles everything into a single file, the relative path to package.json might not resolve correctly since ../package.json assumes the original directory structure. The catch block handles this gracefully by returning 'unknown', so it won't break anything - just something to be aware of if version tracking matters to ye.

typescript/warp-monitor/src/index.ts (1)

1-22: Clean barrel exports, like organizing the swamp nice and tidy.

The public API surface is well-defined with clear separation between the main class, metrics utilities, types, and logger helpers. Using .js extensions for ESM imports is correct.

typescript/warp-monitor/package.json (2)

1-67: Package structure is solid overall.

The package manifest is well-organized with proper ESM configuration, bin entry point, sensible scripts (including the ncc bundling workflow), and appropriate engine constraints. The metadata and repository info are all in order.


31-31: No changes needed here – this is the right way to do it.

The @hyperlane-xyz/registry dependency uses catalog: protocol, which is exactly how this monorepo manages external npm packages. The pnpm catalog in pnpm-workspace.yaml pins it to version 23.7.0, and catalogMode: strict ensures all packages follow this pattern. It's centralized version management, which is cleaner than scattering version numbers across individual package.json files.

typescript/warp-monitor/src/utils.ts (2)

28-37: The tryFn helper does its job, but swallows all errors.

This is fine for the monitoring use case where you don't want one failing token check to bring down the whole service. Just be mindful that errors are only logged, never propagated - if callers ever need to know whether something succeeded, they'd need a different pattern.


7-18: Logger initialization is thoughtful.

Setting both the module-scoped logger and the root logger ensures consistent logging throughout the application. The dynamic import for createServiceLogger is an interesting choice - probably to handle some module loading nuances.

.github/workflows/warp-monitor-docker.yml (2)

115-124: Change detection looks good, but the git diff might get finicky.

The git diff --name-only origin/${{ github.base_ref }}...HEAD command assumes origin/${{ github.base_ref }} is available. Since you're using fetch-depth: 0, this should work, but if the base branch hasn't been fetched (edge case), it could fail silently. The grep -qE will return false, so it won't break the workflow - it'll just not comment.

Might be worth adding a fetch of the base branch explicitly if you run into issues.


1-51: Workflow setup is proper, like a well-organized swamp.

The trigger paths include all the dependencies (sdk, provider-sdk, utils) that could affect the warp-monitor build, which is smart. Concurrency handling will prevent resource waste on rapid pushes. The secret check pattern is a good defensive practice.

typescript/warp-monitor/src/metrics.ts (1)

122-193: Metric update functions are well-organized.

The labeling strategy is consistent, and the value-at-risk calculation across all chains is a nice touch. Logging at each update helps with debugging without being excessive.

typescript/warp-monitor/src/monitor.ts (6)

50-57: WarpMonitor class setup is clean and simple.

The constructor just stores config and registry - no heavy initialization. This follows good practices by deferring expensive operations to start().


73-96: Registry and WarpCore initialization is solid.

The sequence of fetching metadata, addresses, building the provider, and creating WarpCore is logically organized. The null check for warp route config (lines 88-92) properly throws if the route doesn't exist.

One thing to keep in mind - if the registry is temporarily unavailable during startup, this will throw and exit. That's probably the right behavior for a daemon that needs valid config to function.


139-155: Polling loop is robust, like an ogre's endurance.

The while(true) with tryFn wrapper ensures the monitor keeps running even if individual updates fail. Running all token updates in parallel with Promise.all is efficient. The sleep between iterations prevents hammering the RPC endpoints.


215-239: Early return and type validation are well-handled.

The check for missing warpDeployConfig and the subsequent type validation for xERC20 tokens are good defensive programming. Logging errors with context (token symbol, chain, expected vs actual type) will help debugging.

One minor observation - the early return at line 220 exits before await Promise.all(promises) at line 292, so any promises already pushed (bridged balance, ATA payer) won't be awaited. This is probably fine since those operations are wrapped in tryFn and will complete eventually, but worth being aware of.


600-607: CoinGecko price fetching could use a bit more defensive handling.

When getTokenPriceByIds returns an array, you're taking prices[0]. If the array is empty (e.g., unknown coin ID), this will return undefined, which is handled. But if the API returns null inside the array (e.g., [null]), you'd get null instead of undefined.

Not a big deal since the callers check for truthiness anyway, but something to be aware of.


486-489: TODO noted for adapter usage.

The comment about using an adapter instead of the factory is a good self-reminder. The current implementation works fine, but refactoring to use a proper adapter would improve consistency with the rest of the codebase.

Copy link
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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
typescript/warp-monitor/src/metrics.ts (1)

240-256: Missing required token_address label, mate.

When you look back at how walletBalanceGauge is created (lines 85-104), it expects these labels: chain, wallet_address, wallet_name, token_address, token_symbol, token_name. But here you're only providing five of them—token_address is missing. The prom-client library will throw a right fit when the label set doesn't match, and your metrics won't get recorded.

For native balances, you can set token_address to an empty string or a sentinel value like '0x0'.

🔎 Suggested fix
 export function updateNativeWalletBalanceMetrics(
   balance: NativeWalletBalance,
 ): void {
   const logger = getLogger();
   walletBalanceGauge
     .labels({
       chain: balance.chain,
       wallet_address: balance.walletAddress,
       wallet_name: balance.walletName,
+      token_address: '0x0',
       token_symbol: 'Native',
       token_name: 'Native',
     })
     .set(balance.balance);
   logger.info('Native wallet balance updated', {
     balanceInfo: balance,
   });
 }
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b85e6b5 and 5457fb6.

📒 Files selected for processing (2)
  • typescript/infra/src/warp/helm.ts
  • typescript/warp-monitor/src/metrics.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • typescript/infra/src/warp/helm.ts
🧰 Additional context used
📓 Path-based instructions (1)
typescript/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

typescript/**/*.{ts,tsx}: Use ChainMap for per-chain configurations in TypeScript
Import types from @hyperlane-xyz/sdk when using TypeScript SDK types

Files:

  • typescript/warp-monitor/src/metrics.ts
🧠 Learnings (2)
📚 Learning: 2025-09-05T15:13:08.394Z
Learnt from: ltyu
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6992
File: typescript/sdk/src/token/types.test.ts:188-197
Timestamp: 2025-09-05T15:13:08.394Z
Learning: WarpRouteDeployConfigSchema.safeParse automatically populates missing token fields during preprocessing, so manual specification of top-level token fields in RoutingFee test cases is not necessary.

Applied to files:

  • typescript/warp-monitor/src/metrics.ts
📚 Learning: 2025-09-18T15:49:20.478Z
Learnt from: yorhodes
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6750
File: solidity/contracts/token/bridge/EverclearTokenBridge.sol:212-212
Timestamp: 2025-09-18T15:49:20.478Z
Learning: EverclearTokenBridge sends funds directly to recipients for ERC20 transfers, while EverclearEthBridge sends funds to remote routers that handle WETH unwrapping and ETH delivery. The virtual _getReceiver and _getIntentCalldata functions enable this architectural difference between the two bridge implementations.

Applied to files:

  • typescript/warp-monitor/src/metrics.ts
🧬 Code graph analysis (1)
typescript/warp-monitor/src/metrics.ts (3)
typescript/sdk/src/index.ts (1)
  • TokenStandard (732-732)
typescript/warp-monitor/src/utils.ts (1)
  • getLogger (20-22)
typescript/warp-monitor/src/types.ts (1)
  • NativeWalletBalance (17-22)
⏰ 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). (60)
  • GitHub Check: cli-evm-e2e-matrix (core-apply)
  • GitHub Check: cli-evm-e2e-matrix (warp-send)
  • GitHub Check: cli-evm-e2e-matrix (warp-init)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-4)
  • GitHub Check: cli-evm-e2e-matrix (warp-read)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-1)
  • GitHub Check: cli-evm-e2e-matrix (core-check)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ism-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-3)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-1)
  • GitHub Check: cli-evm-e2e-matrix (status)
  • GitHub Check: cli-evm-e2e-matrix (warp-rebalancer)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-simple-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-5)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-submitters)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-rebalancing-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-basic)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-hook-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-2)
  • GitHub Check: cli-evm-e2e-matrix (core-init)
  • GitHub Check: cli-evm-e2e-matrix (core-deploy)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-config)
  • GitHub Check: cli-evm-e2e-matrix (core-read)
  • GitHub Check: cli-evm-e2e-matrix (relay)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-recovery)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-route-extension)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, igp)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, core)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, core)
  • GitHub Check: env-test-matrix (testnet4, sepolia, core)
  • GitHub Check: cli-cosmos-e2e-matrix (core-apply)
  • GitHub Check: env-test-matrix (mainnet3, optimism, igp)
  • GitHub Check: cli-radix-e2e-matrix (warp-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (core-deploy)
  • GitHub Check: env-test-matrix (mainnet3, optimism, core)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, igp)
  • GitHub Check: cli-radix-e2e-matrix (core-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (core-read)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-read)
  • GitHub Check: cli-cosmos-e2e-matrix (core-check)
  • GitHub Check: aleo-sdk-e2e-run
  • GitHub Check: cli-radix-e2e-matrix (core-apply)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: pnpm-test-run
  • GitHub Check: cli-cosmos-e2e-matrix (warp-deploy)
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-deploy)
  • GitHub Check: cosmos-sdk-e2e-run
  • GitHub Check: cli-install-test-run
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-apply)
  • GitHub Check: infra-test
  • GitHub Check: build-and-push-to-gcr
  • GitHub Check: build-and-push-to-gcr
  • GitHub Check: e2e-matrix (evm)
  • GitHub Check: lint-rs
  • GitHub Check: test-rs
  • GitHub Check: lander-coverage
🔇 Additional comments (7)
typescript/warp-monitor/src/metrics.ts (7)

1-17: Imports look solid.

Type-only imports from SDK and utils are used properly, and the new http and getLogger imports make sense for the server functionality.


21-21: Type rename follows conventions.

Capitalizing to SupportedTokenStandards aligns with TypeScript naming conventions for type aliases.

Also applies to: 32-32, 64-64


85-106: Helper function nicely consolidates gauge creation.

The createWalletBalanceGauge helper makes it easy to create wallet balance gauges with consistent labels and optional extensions.


122-193: Logger initialization pattern looks good.

Initializing the logger at the start of the function and using it for structured logging throughout is clean and consistent.


195-238: Lockbox balance metrics update is consistent.

The same logger pattern and structured logging approach is applied here, which is good for maintainability.


258-290: xERC20 limits update is well-structured.

The iteration over limit types and structured logging make this easy to follow and debug.


292-324: Past issues have been sorted out.

The previous review flagged the missing hyphen in Content-Type and the hanging client when metrics collection failed. Both of those are fixed now—line 314 has the correct header format, and lines 316-321 properly handle errors by logging and sending a 500 response. The server implementation looks solid.

paulbalaji and others added 2 commits December 22, 2025 17:01
Use pinned Foundry binaries from solidity/.foundryrc instead of curl|bash
installer for reproducibility. Uses bash shell for pipefail support.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Always build on pushes to main (match monorepo behavior)
- Only trigger PR builds for direct warp-monitor changes
- Remove unnecessary check-changes step

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@paulbalaji paulbalaji enabled auto-merge December 22, 2025 17:12
@paulbalaji paulbalaji disabled auto-merge December 22, 2025 17:12
Copy link
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: 1

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5457fb6 and 16bf62c.

📒 Files selected for processing (2)
  • .github/workflows/warp-monitor-docker.yml
  • typescript/warp-monitor/Dockerfile
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/warp-monitor-docker.yml
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
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/mainnet_config.json in future code reviews as requested by paulbalaji.
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.
📚 Learning: 2025-12-22T16:50:19.890Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7565
File: typescript/ccip-server/Dockerfile:10-11
Timestamp: 2025-12-22T16:50:19.890Z
Learning: Standardize Foundry installation in Dockerfiles by using the official curl -L https://foundry.paradigm.xyz | bash followed by foundryup. This pattern is already used across multiple Dockerfiles in the repo and should be retained for consistency and reliability wherever Foundry is installed.

Applied to files:

  • typescript/warp-monitor/Dockerfile
📚 Learning: 2025-08-13T16:53:55.163Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6891
File: typescript/infra/config/environments/mainnet3/funding.ts:22-22
Timestamp: 2025-08-13T16:53:55.163Z
Learning: In Hyperlane mainnet3 configs, funding.ts uses 'gcr.io/abacus-labs-dev/hyperlane-monorepo' docker image while agent.ts uses 'gcr.io/abacus-labs-dev/hyperlane-agent' docker image. These are different images with independent tag cycles, so tag consistency across them is not expected.

Applied to files:

  • typescript/warp-monitor/Dockerfile
📚 Learning: 2025-11-25T17:10:33.369Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7410
File: solidity/foundry.toml:8-8
Timestamp: 2025-11-25T17:10:33.369Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, when using pnpm (instead of Yarn), Foundry's `allow_paths` in solidity/foundry.toml should be set to `["./node_modules"]` rather than `["../node_modules"]` because pnpm's default node_modules structure places dependencies locally in the workspace subdirectory, not requiring access to the parent directory's node_modules.

Applied to files:

  • typescript/warp-monitor/Dockerfile
⏰ 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). (63)
  • 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-4)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-5)
  • GitHub Check: cli-evm-e2e-matrix (warp-init)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-1)
  • GitHub Check: cli-evm-e2e-matrix (status)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-basic)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-submitters)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ism-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-3)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-rebalancer)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-recovery)
  • GitHub Check: cli-evm-e2e-matrix (warp-send)
  • 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-deploy-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-rebalancing-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-simple-updates)
  • GitHub Check: cli-evm-e2e-matrix (core-read)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-2)
  • GitHub Check: cli-evm-e2e-matrix (core-init)
  • GitHub Check: cli-evm-e2e-matrix (core-apply)
  • GitHub Check: cli-evm-e2e-matrix (core-check)
  • GitHub Check: cli-evm-e2e-matrix (relay)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, igp)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, core)
  • GitHub Check: env-test-matrix (mainnet3, optimism, igp)
  • 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, arbitrum, core)
  • GitHub Check: cli-cosmos-e2e-matrix (core-read)
  • GitHub Check: cli-cosmos-e2e-matrix (core-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (core-check)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-read)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-deploy)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: pnpm-test-run
  • 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-radix-e2e-matrix (warp-deploy)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-route-extension)
  • GitHub Check: aleo-sdk-e2e-run
  • GitHub Check: cosmos-sdk-e2e-run
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-apply)
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-deploy)
  • GitHub Check: cli-install-test-run
  • GitHub Check: infra-test
  • GitHub Check: e2e-matrix (evm)
  • GitHub Check: agent-configs (mainnet3)
  • GitHub Check: agent-configs (testnet4)
  • GitHub Check: lint-prettier
  • GitHub Check: test-rs
  • GitHub Check: lint-rs
  • GitHub Check: lander-coverage
  • GitHub Check: build-and-push-to-gcr
  • GitHub Check: build-and-push-to-gcr
🔇 Additional comments (4)
typescript/warp-monitor/Dockerfile (4)

1-7: Base image and dependencies look solid.

The slim image with build essentials and cleanup is a sensible approach. No concerns here.


18-43: Dependency installation is well-structured.

The layer caching strategy (package.json first, then frozen lockfile install) and the selective copying for workspace dependencies are spot on. Keeps the build efficient.


45-62: Build and bundle step looks good.

Copying source after deps keeps your layers cached properly, and the turbo filter ensures you're only bundling what's needed. Clean approach.


9-16: Foundry installation approach is solid.

This setup is exactly right—the FOUNDRY_VERSION argument gets fed from the centralized solidity/.foundryrc file in CI (which contains v1.5.0), so there's no risk of a missing value. The deliberate move to pinned binaries rather than the installer script keeps your image reproducible and consistent across builds. Architecture detection for arm64/amd64 looks good too. All layers fit together like layers in an ogre, mate.

@paulbalaji
Copy link
Collaborator Author

@greptileai

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

27 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Copy link
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: 1

🧹 Nitpick comments (4)
typescript/warp-monitor/src/metrics.ts (1)

293-325: Metrics server looks tidy after the fixes.

The error handling now properly sends a 500 response instead of leavin' the client hangin' like a lost donkey. Header name is correct too.

One small thing though - if someone sets PROMETHEUS_PORT to somethin' that ain't a number, parseInt will give you NaN and that could cause unexpected behavior when listen is called.

🔎 Optional: Add port validation
-    .listen(parseInt(process.env['PROMETHEUS_PORT'] || '9090'));
+    .listen((() => {
+      const port = parseInt(process.env['PROMETHEUS_PORT'] || '9090', 10);
+      if (isNaN(port) || port < 0 || port > 65535) {
+        throw new Error(`Invalid PROMETHEUS_PORT: ${process.env['PROMETHEUS_PORT']}`);
+      }
+      return port;
+    })());
typescript/warp-monitor/src/monitor.ts (3)

139-155: Infinite polling loop could use a shutdown mechanism.

The while (true) loop does the job, but there's no way to gracefully stop it. If this ever needs to be shut down cleanly (for testing, pod termination signals, etc.), you'd have no handle to do so.

🔎 Consider adding a shutdown mechanism
 export class WarpMonitor {
   private readonly config: WarpMonitorConfig;
   private readonly registry: IRegistry;
+  private isRunning = false;

   constructor(config: WarpMonitorConfig, registry: IRegistry) {
     this.config = config;
     this.registry = registry;
   }

+  stop(): void {
+    this.isRunning = false;
+  }

   // In pollAndUpdateWarpRouteMetrics:
-    while (true) {
+    this.isRunning = true;
+    while (this.isRunning) {

486-489: TODO about using adapter.

There's a TODO here about using an adapter instead of directly connecting with the factory. Worth tracking if this is intended to be addressed.

Would you like me to open an issue to track refactoring this to use an adapter instead of direct factory connection?


600-607: Price getter could silently return undefined for valid IDs.

If getTokenPriceByIds returns an array but it's empty (e.g., the coingeckoId wasn't found in CoinGecko's database), prices[0] will be undefined. This is technically fine since the return type accounts for it, but there's no logging to help debug why a price wasn't found.

🔎 Optional: Add debug logging for price lookup failures
   private async getCoingeckoPrice(
     tokenPriceGetter: CoinGeckoTokenPriceGetter,
     coingeckoId: string,
   ): Promise<number | undefined> {
+    const logger = getLogger();
     const prices = await tokenPriceGetter.getTokenPriceByIds([coingeckoId]);
-    if (!prices) return undefined;
+    if (!prices || prices.length === 0 || prices[0] === undefined) {
+      logger.debug({ coingeckoId }, 'No price returned from CoinGecko');
+      return undefined;
+    }
     return prices[0];
   }
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 16bf62c and 182887d.

📒 Files selected for processing (2)
  • typescript/warp-monitor/src/metrics.ts
  • typescript/warp-monitor/src/monitor.ts
🧰 Additional context used
📓 Path-based instructions (1)
typescript/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

typescript/**/*.{ts,tsx}: Use ChainMap for per-chain configurations in TypeScript
Import types from @hyperlane-xyz/sdk when using TypeScript SDK types

Files:

  • typescript/warp-monitor/src/metrics.ts
  • typescript/warp-monitor/src/monitor.ts
🧠 Learnings (3)
📓 Common learnings
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/mainnet_config.json in future code reviews as requested by paulbalaji.
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.
📚 Learning: 2025-09-05T15:13:08.394Z
Learnt from: ltyu
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6992
File: typescript/sdk/src/token/types.test.ts:188-197
Timestamp: 2025-09-05T15:13:08.394Z
Learning: WarpRouteDeployConfigSchema.safeParse automatically populates missing token fields during preprocessing, so manual specification of top-level token fields in RoutingFee test cases is not necessary.

Applied to files:

  • typescript/warp-monitor/src/metrics.ts
📚 Learning: 2025-09-18T15:49:20.478Z
Learnt from: yorhodes
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6750
File: solidity/contracts/token/bridge/EverclearTokenBridge.sol:212-212
Timestamp: 2025-09-18T15:49:20.478Z
Learning: EverclearTokenBridge sends funds directly to recipients for ERC20 transfers, while EverclearEthBridge sends funds to remote routers that handle WETH unwrapping and ETH delivery. The virtual _getReceiver and _getIntentCalldata functions enable this architectural difference between the two bridge implementations.

Applied to files:

  • typescript/warp-monitor/src/metrics.ts
🧬 Code graph analysis (1)
typescript/warp-monitor/src/metrics.ts (2)
typescript/warp-monitor/src/utils.ts (1)
  • getLogger (20-22)
typescript/warp-monitor/src/types.ts (1)
  • NativeWalletBalance (17-22)
⏰ 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). (61)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-hook-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-rebalancer)
  • 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-init)
  • 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-check-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-read)
  • 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 (warp-bridge-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cli-evm-e2e-matrix (core-deploy)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-submitters)
  • GitHub Check: cli-evm-e2e-matrix (status)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ism-updates)
  • GitHub Check: cli-evm-e2e-matrix (core-check)
  • GitHub Check: cli-evm-e2e-matrix (core-apply)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-rebalancing-config)
  • GitHub Check: cli-evm-e2e-matrix (core-init)
  • GitHub Check: cli-evm-e2e-matrix (relay)
  • GitHub Check: cli-evm-e2e-matrix (core-read)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, igp)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, core)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-read)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, igp)
  • GitHub Check: cli-cosmos-e2e-matrix (core-deploy)
  • GitHub Check: env-test-matrix (mainnet3, optimism, igp)
  • GitHub Check: env-test-matrix (testnet4, sepolia, core)
  • GitHub Check: cli-cosmos-e2e-matrix (core-check)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (core-apply)
  • GitHub Check: cli-cosmos-e2e-matrix (core-read)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, core)
  • GitHub Check: aleo-sdk-e2e-run
  • GitHub Check: env-test-matrix (mainnet3, optimism, core)
  • GitHub Check: cli-radix-e2e-matrix (warp-deploy)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cli-radix-e2e-matrix (core-deploy)
  • GitHub Check: cli-radix-e2e-matrix (core-apply)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-route-extension)
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-apply)
  • GitHub Check: pnpm-test-run
  • GitHub Check: cli-install-test-run
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-deploy)
  • GitHub Check: cosmos-sdk-e2e-run
  • GitHub Check: build-and-push-to-gcr
  • GitHub Check: build-and-push-to-gcr
  • GitHub Check: infra-test
  • GitHub Check: e2e-matrix (evm)
  • GitHub Check: lint-prettier
  • GitHub Check: test-rs
  • GitHub Check: lint-rs
  • GitHub Check: lander-coverage
🔇 Additional comments (7)
typescript/warp-monitor/src/metrics.ts (3)

1-17: Imports look good, mate.

Type-only imports for SDK types and the new getLogger utility are properly organized. Using type keyword for imports that are only used as types is a nice touch for the swamp.


85-106: Solid helper for gauge creation.

The createWalletBalanceGauge factory is a tidy way to avoid duplicatin' yourself. Extendable with additional labels and properly registered. Nothin' onion-y about this one.


122-193: Token balance metric updates look proper.

The logger integration and structured logging with labels give good observability into what's happenin' in the swamp. The value-at-risk calculation for all chains is a nice touch.

typescript/warp-monitor/src/monitor.ts (4)

1-43: Imports are well organized.

Good use of type imports where appropriate. The mix of ethers, hyperlane core/registry/sdk/utils, and local modules is cleanly structured. Like layers of an onion, each has its purpose.


50-116: WarpMonitor class initialization looks solid.

The constructor is simple and the start() method properly sets up logger bindings, starts the metrics server, builds the MultiProtocolProvider with mailboxes merged, and validates the warp route config exists before proceeding. Good structured logging throughout.


295-345: Token bridged balance retrieval is well structured.

Good defensive checks for non-Hyperlane tokens and undefined bridged supply. The price lookup is correctly scoped to collateralized and lockbox tokens. Logging warnings for edge cases is helpful for debugging.


466-469: Minimal ABI defined inline - acceptable but could be shared.

This works fine for now. If other parts of the codebase need the same ABI, you might want to move it somewhere shared. But for a single use case in this monitor, keepin' it local ain't a problem.

Copy link
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)
typescript/warp-monitor/src/monitor.ts (2)

139-153: Consider the impact of parallel token updates on RPC endpoints.

Right now you're updating all tokens in parallel (line 141) with Promise.all. For deployments with many tokens across chains, this could overwhelm rate-limited RPC endpoints—especially public ones. Based on learnings from similar code, parallel requests can cause rate limiting issues.

If you start seeing RPC errors in production, you might want to process tokens sequentially or in smaller batches, even though it'll be slower.

Based on learnings from past RPC optimization reviews.


473-509: TODO comment indicates planned refactor.

There's a TODO at line 491 to use an adapter instead of directly connecting with the factory. The current implementation works, but using an adapter would be more consistent with the rest of the codebase.

Would you like me to open an issue to track this refactor?

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 182887d and b87b8ce.

📒 Files selected for processing (1)
  • typescript/warp-monitor/src/monitor.ts
🧰 Additional context used
📓 Path-based instructions (1)
typescript/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

typescript/**/*.{ts,tsx}: Use ChainMap for per-chain configurations in TypeScript
Import types from @hyperlane-xyz/sdk when using TypeScript SDK types

Files:

  • typescript/warp-monitor/src/monitor.ts
🧠 Learnings (1)
📚 Learning: 2025-07-22T22:21:54.918Z
Learnt from: xeno097
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6746
File: typescript/sdk/src/timelock/evm/EvmTimelockReader.ts:155-166
Timestamp: 2025-07-22T22:21:54.918Z
Learning: When reviewing RPC call optimizations in timelock-related code, be mindful that parallel requests using Promise.all can cause rate limiting issues with public RPC endpoints. Sequential processing, while slower, is often preferred for reliability and to avoid overwhelming RPC providers.

Applied to files:

  • typescript/warp-monitor/src/monitor.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). (42)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-5)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-basic)
  • GitHub Check: cli-evm-e2e-matrix (warp-send)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-read)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-submitters)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-3)
  • 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-check-4)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-rebalancer)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-rebalancing-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ism-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cli-evm-e2e-matrix (relay)
  • GitHub Check: cli-cosmos-e2e-matrix (core-deploy)
  • GitHub Check: cli-evm-e2e-matrix (core-deploy)
  • GitHub Check: cli-evm-e2e-matrix (core-apply)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, core)
  • GitHub Check: cli-radix-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 (warp-read)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-apply)
  • 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: cosmos-sdk-e2e-run
  • GitHub Check: aleo-sdk-e2e-run
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-deploy)
  • GitHub Check: e2e-matrix (evm)
  • GitHub Check: lint-rs
  • GitHub Check: lander-coverage
  • GitHub Check: test-rs
  • GitHub Check: build-and-push-to-gcr
🔇 Additional comments (16)
typescript/warp-monitor/src/monitor.ts (16)

1-43: Imports look solid.

The type imports from @hyperlane-xyz/sdk are properly used, and the structure follows the coding guidelines. Good use of type-only imports where appropriate.


45-48: Interface definition is clean.

The XERC20Info interface is well-defined for internal use.


50-57: Constructor is straightforward.

Clean initialization with readonly fields for config and registry.


59-116: Initialization logic is well-structured.

The method properly orchestrates registry access, provider setup, and config validation before starting the monitoring loop.


157-295: Token metrics update flow handles all cases properly.

The method correctly handles different token types (Sealevel, xERC20, extra lockboxes) and properly awaits all promises before returning, even on early exits. The previous concern about unawaited promises has been addressed.


297-347: Balance retrieval logic is sound.

The method properly handles different token types and gracefully returns undefined when balance can't be determined. Optional price handling is appropriate.


349-375: Collateral info retrieval is implemented correctly.

Method properly chains contract calls to extract token metadata from the lockbox.


377-379: Helper method does its job.

Simple wrapper around token formatting.


385-413: Sealevel ATA payer balance logic is correct.

The method properly validates protocol type and retrieves the native balance for the ATA payer account.


415-447: xERC20 info retrieval handles all standard variants.

The method correctly handles both xERC20 and xERC20Lockbox token standards with proper adapter casting.


449-466: Limit retrieval efficiently fetches all values.

Good use of Promise.all to parallelize the four limit queries and proper formatting of results.


468-471: Minimal ABI is properly defined.

The readonly constant with const assertion is the right approach for this minimal contract interface.


511-523: Contract instantiation is straightforward.

Helper method correctly creates a Contract instance with the minimal ABI for lockbox interactions.


525-577: Extra lockbox balance retrieval has proper error handling.

The method correctly handles the case where a token isn't xERC20 and includes a try/catch block for balance fetching with appropriate error logging. The explicit undefined return pattern was already noted in a previous review.


579-600: Price lookup gracefully handles missing CoinGecko IDs.

The method appropriately returns undefined when a token doesn't have a CoinGecko ID, which is expected for certain token types.


602-609: CoinGecko price lookup is simple and correct.

The method properly handles the case when prices aren't available. The rate limiting concern for CoinGecko is already addressed earlier in the code with appropriate warnings when no API key is provided.

Copy link
Contributor

@antigremlin antigremlin left a comment

Choose a reason for hiding this comment

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

Cool. Same suggestions on initialising the VERSION to be printed to the logs, and making the package private.

paulbalaji and others added 6 commits December 29, 2025 18:34
ncc cannot bundle dynamically imported packages. Mark the GCP logging
config as external and install it separately in the Docker image.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add missing @hyperlane-xyz/eslint-config devDependency
- Exclude warp-monitor from main Dockerfile check (has its own Dockerfile)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
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: 1

🧹 Nitpick comments (1)
typescript/warp-monitor/Dockerfile (1)

76-76: Using npm instead of pnpm in the runner stage.

You're installing @google-cloud/pino-logging-gcp-config with npm here, but the builder used pnpm. This works fine since it's a standalone install with no lockfile, but mixing package managers could lead to version drift if the catalog definition in the builder resolves to a different version than npm's latest.

For consistency and reproducibility, consider extracting the resolved version from the builder's lockfile and pinning it explicitly.

🔎 Alternative approach for pinned version

Extract the version during build and pin it:

+# Extract the resolved version of the GCP logging package from the builder
+RUN --mount=from=builder,source=/hyperlane-monorepo/pnpm-lock.yaml,target=/tmp/pnpm-lock.yaml \
+    VERSION=$(grep -A 2 "@google-cloud/pino-logging-gcp-config" /tmp/pnpm-lock.yaml | grep "version:" | head -1 | awk '{print $2}') && \
+    npm install "@google-cloud/pino-logging-gcp-config@${VERSION}"
-RUN npm install @google-cloud/pino-logging-gcp-config

Or simpler—just pin a specific version directly:

-RUN npm install @google-cloud/pino-logging-gcp-config
+RUN npm install @google-cloud/pino-logging-gcp-config@^6.0.0
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ef1d6e and fbc50f4.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • scripts/check-package-json.sh
  • typescript/warp-monitor/Dockerfile
  • typescript/warp-monitor/package.json
🧰 Additional context used
🧠 Learnings (9)
📓 Common learnings
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7545
File: typescript/infra/src/rebalancer/helm.ts:82-83
Timestamp: 2025-12-29T19:45:05.429Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, Docker image tags in Helm managers (e.g., typescript/infra/src/rebalancer/helm.ts) are intentionally hardcoded for reproducibility and explicit version control, rather than using dynamically generated CI tags.
📚 Learning: 2025-08-26T13:45:29.848Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: typescript/infra/config/environments/testnet4/ism/verification.json:3835-3939
Timestamp: 2025-08-26T13:45:29.848Z
Learning: Skip reviewing verification.json files in typescript/infra/config/environments/testnet4/ism/verification.json and similar verification.json files as requested by paulbalaji.

Applied to files:

  • scripts/check-package-json.sh
📚 Learning: 2025-12-29T19:45:05.429Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7545
File: typescript/infra/src/rebalancer/helm.ts:82-83
Timestamp: 2025-12-29T19:45:05.429Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, Docker image tags in Helm managers (e.g., typescript/infra/src/rebalancer/helm.ts) are intentionally hardcoded for reproducibility and explicit version control, rather than using dynamically generated CI tags.

Applied to files:

  • typescript/warp-monitor/Dockerfile
  • typescript/warp-monitor/package.json
📚 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/mainnet_config.json in future code reviews as requested by paulbalaji.

Applied to files:

  • typescript/warp-monitor/Dockerfile
📚 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:

  • typescript/warp-monitor/Dockerfile
📚 Learning: 2025-12-22T16:50:19.890Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7565
File: typescript/ccip-server/Dockerfile:10-11
Timestamp: 2025-12-22T16:50:19.890Z
Learning: Standardize Foundry installation in Dockerfiles by using the official curl -L https://foundry.paradigm.xyz | bash followed by foundryup. This pattern is already used across multiple Dockerfiles in the repo and should be retained for consistency and reliability wherever Foundry is installed.

Applied to files:

  • typescript/warp-monitor/Dockerfile
📚 Learning: 2025-08-13T16:53:55.163Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6891
File: typescript/infra/config/environments/mainnet3/funding.ts:22-22
Timestamp: 2025-08-13T16:53:55.163Z
Learning: In Hyperlane mainnet3 configs, funding.ts uses 'gcr.io/abacus-labs-dev/hyperlane-monorepo' docker image while agent.ts uses 'gcr.io/abacus-labs-dev/hyperlane-agent' docker image. These are different images with independent tag cycles, so tag consistency across them is not expected.

Applied to files:

  • typescript/warp-monitor/Dockerfile
📚 Learning: 2025-11-25T17:10:33.369Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7410
File: solidity/foundry.toml:8-8
Timestamp: 2025-11-25T17:10:33.369Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, when using pnpm (instead of Yarn), Foundry's `allow_paths` in solidity/foundry.toml should be set to `["./node_modules"]` rather than `["../node_modules"]` because pnpm's default node_modules structure places dependencies locally in the workspace subdirectory, not requiring access to the parent directory's node_modules.

Applied to files:

  • typescript/warp-monitor/Dockerfile
  • typescript/warp-monitor/package.json
📚 Learning: 2025-11-26T13:28:51.658Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7410
File: typescript/cli/package.json:20-20
Timestamp: 2025-11-26T13:28:51.658Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, hyperlane-xyz/registry is maintained in a separate repository and published to npm, so it should use a pinned version (e.g., "23.6.0") rather than the workspace protocol ("workspace:*") that other internal Hyperlane packages use.

Applied to files:

  • typescript/warp-monitor/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). (61)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-recovery)
  • GitHub Check: cli-evm-e2e-matrix (warp-send)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ism-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-config)
  • GitHub Check: cli-evm-e2e-matrix (warp-deploy-1)
  • GitHub Check: cli-evm-e2e-matrix (core-init)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-simple-updates)
  • GitHub Check: cli-evm-e2e-matrix (core-read)
  • GitHub Check: cli-evm-e2e-matrix (warp-extend-basic)
  • GitHub Check: cli-evm-e2e-matrix (relay)
  • GitHub Check: cli-evm-e2e-matrix (warp-read)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-4)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-2)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-submitters)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-2)
  • GitHub Check: cli-evm-e2e-matrix (core-apply)
  • GitHub Check: cli-evm-e2e-matrix (warp-rebalancer)
  • GitHub Check: cli-evm-e2e-matrix (warp-init)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-ownership-updates)
  • 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-hook-updates)
  • GitHub Check: cli-evm-e2e-matrix (warp-check-3)
  • GitHub Check: cli-evm-e2e-matrix (warp-bridge-1)
  • GitHub Check: cli-evm-e2e-matrix (warp-apply-rebalancing-config)
  • GitHub Check: cli-evm-e2e-matrix (core-deploy)
  • GitHub Check: cli-evm-e2e-matrix (core-check)
  • GitHub Check: cli-evm-e2e-matrix (status)
  • GitHub Check: env-test-matrix (testnet4, sepolia, core)
  • GitHub Check: env-test-matrix (mainnet3, optimism, core)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, core)
  • GitHub Check: env-test-matrix (mainnet3, ethereum, igp)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, igp)
  • GitHub Check: env-test-matrix (mainnet3, arbitrum, core)
  • GitHub Check: env-test-matrix (mainnet3, optimism, igp)
  • GitHub Check: cli-cosmos-e2e-matrix (core-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (core-check)
  • GitHub Check: cli-radix-e2e-matrix (core-apply)
  • GitHub Check: cli-cosmos-e2e-matrix (core-read)
  • GitHub Check: cli-cosmos-e2e-matrix (warp-deploy)
  • GitHub Check: cli-cosmos-e2e-matrix (core-apply)
  • GitHub Check: aleo-sdk-e2e-run
  • GitHub Check: cli-cosmos-e2e-matrix (warp-read)
  • GitHub Check: cli-radix-e2e-matrix (warp-deploy)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-route-extension)
  • GitHub Check: cli-radix-e2e-matrix (warp-apply-ownership-updates)
  • GitHub Check: cli-radix-e2e-matrix (core-deploy)
  • GitHub Check: cli-install-test-run
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-apply)
  • GitHub Check: pnpm-test-run
  • GitHub Check: cli-cross-chain-e2e-matrix (warp-deploy)
  • GitHub Check: cosmos-sdk-e2e-run
  • GitHub Check: infra-test
  • GitHub Check: build-and-push-to-gcr
  • GitHub Check: build-and-push-to-gcr
  • GitHub Check: e2e-matrix (evm)
  • GitHub Check: agent-configs (mainnet3)
  • GitHub Check: lint-rs
  • GitHub Check: test-rs
  • GitHub Check: lander-coverage
🔇 Additional comments (6)
typescript/warp-monitor/package.json (2)

1-59: Overall package structure looks solid.

The manifest is well-structured with proper metadata, engine constraints, and the bundle script correctly excludes the dynamically-imported GCP logging package. Scripts align with the Docker build flow and the dependency patterns follow monorepo conventions.


22-22: The catalog setup here is already locked down right—@hyperlane-xyz/registry is pinned to 23.7.0 in the catalog definition, so the catalog: reference resolves to that exact version and won't drift unexpectedly. No changes needed.

typescript/warp-monitor/Dockerfile (4)

1-21: Builder base setup looks good.

The slim image with foundry installation, corepack setup, and architecture-aware binary selection is solid. Using a pinned foundry version as an ARG gives you reproducibility while keeping flexibility.


29-43: Selective package.json copying is efficient.

Copying just the package manifests needed for warp-monitor before pnpm install takes advantage of Docker layer caching—changes to source files won't invalidate the dependency installation layer. Smart move for faster rebuilds.


46-63: Build flow aligns with the bundle strategy.

Source files are copied after dependency installation, and the turbo bundle command produces the ncc output. This matches the package.json bundle script that outputs to ./bundle and handles the external GCP logging package.


78-88: Production runtime configuration is appropriate.

Alpine base keeps the image tiny, environment variables are sensible defaults, port 9090 is exposed for metrics scraping, and the CMD runs the bundled service. Clean setup for the production stage.

paulbalaji and others added 5 commits December 29, 2025 20:20
@paulbalaji paulbalaji enabled auto-merge December 30, 2025 14:01
@hyper-gonk
Copy link
Contributor

hyper-gonk bot commented Dec 30, 2025

🕵️ Warp Monitor Docker Image Built Successfully

Image Tags:

gcr.io/abacus-labs-dev/hyperlane-warp-monitor:pr-7653
gcr.io/abacus-labs-dev/hyperlane-warp-monitor:e1aa971-20251230-140157

@hyper-gonk
Copy link
Contributor

hyper-gonk bot commented Dec 30, 2025

🐳 Monorepo Docker Image Built Successfully

Image Tags:

gcr.io/abacus-labs-dev/hyperlane-monorepo:pr-7653
gcr.io/abacus-labs-dev/hyperlane-monorepo:e1aa971-20251230-140151

@paulbalaji paulbalaji added this pull request to the merge queue Dec 30, 2025
Merged via the queue into main with commit dee2a40 Dec 30, 2025
90 checks passed
@paulbalaji paulbalaji deleted the feat/standalone-warp-monitor branch December 30, 2025 14:20
@github-project-automation github-project-automation bot moved this from In Review to Done in Hyperlane Tasks Dec 30, 2025
@codecov
Copy link

codecov bot commented Dec 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.02%. Comparing base (28b7e69) to head (e1aa971).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7653   +/-   ##
=======================================
  Coverage   77.02%   77.02%           
=======================================
  Files         117      117           
  Lines        2651     2651           
  Branches      244      244           
=======================================
  Hits         2042     2042           
  Misses        593      593           
  Partials       16       16           
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.

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