Skip to content

Add prod deployment verification tests#168

Merged
thedavidmeister merged 1 commit intomainfrom
2026-03-10-prod
Mar 10, 2026
Merged

Add prod deployment verification tests#168
thedavidmeister merged 1 commit intomainfrom
2026-03-10-prod

Conversation

@thedavidmeister
Copy link
Contributor

@thedavidmeister thedavidmeister commented Mar 10, 2026

Forks each supported network (Arbitrum, Base, Base Sepolia, Flare, Polygon) and verifies both log tables and DecimalFloat contracts exist at expected addresses with correct code hashes. Adds deploy RPC URLs to CI workflow.

Motivation

Solution

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

Summary by CodeRabbit

  • Chores

    • Enhanced CI configuration to support multi-network deployments across multiple blockchain networks.
  • Tests

    • Added tests to verify production deployments and code integrity across supported networks.

Forks each supported network (Arbitrum, Base, Base Sepolia, Flare,
Polygon) and verifies both log tables and DecimalFloat contracts exist
at expected addresses with correct code hashes. Adds deploy RPC URLs
to CI workflow.

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

coderabbitai bot commented Mar 10, 2026

Walkthrough

The changes add RPC URL environment variables to the CI workflow for multiple blockchain networks and introduce a new test contract that verifies production deployments of DecimalFloat contracts across Arbitrum, Base, Base Sepolia, Flare, and Polygon networks by validating code hashes.

Changes

Cohort / File(s) Summary
CI Configuration
.github/workflows/rainix.yaml
Adds five optional RPC URL environment variables (CI_DEPLOY_ARBITRUM_RPC_URL, CI_DEPLOY_BASE_RPC_URL, CI_DEPLOY_BASE_SEPOLIA_RPC_URL, CI_DEPLOY_FLARE_RPC_URL, CI_DEPLOY_POLYGON_RPC_URL) to the Rainix step, each with fallback to empty string.
Production Deployment Tests
test/src/lib/deploy/LibDecimalFloatDeployProd.t.sol
Introduces a new test contract with an internal helper function that forks a specified network, reads deployed contract addresses, and verifies both code existence and code hash correctness. Adds five external test entry points for network-specific deployment verification (Arbitrum, Base, Base Sepolia, Flare, Polygon).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding production deployment verification tests across multiple networks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 2026-03-10-prod

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@test/src/lib/deploy/LibDecimalFloatDeployProd.t.sol`:
- Line 7: Remove the unused import LibRainDeploy from the top of the test file;
locate the import statement referencing LibRainDeploy in
LibDecimalFloatDeployProd.t.sol and delete that import line so the file no
longer imports LibRainDeploy (ensure no other references to LibRainDeploy
remain).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b6fc5a99-6906-4bf1-be10-96e32cb1e88a

📥 Commits

Reviewing files that changed from the base of the PR and between ddd90b3 and fae6051.

📒 Files selected for processing (2)
  • .github/workflows/rainix.yaml
  • test/src/lib/deploy/LibDecimalFloatDeployProd.t.sol


import {Test} from "forge-std/Test.sol";
import {LibDecimalFloatDeploy} from "src/lib/deploy/LibDecimalFloatDeploy.sol";
import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol";
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Unused import: LibRainDeploy

LibRainDeploy is imported but never referenced in this file. Remove it to keep the codebase clean.

🧹 Remove unused import
 import {Test} from "forge-std/Test.sol";
 import {LibDecimalFloatDeploy} from "src/lib/deploy/LibDecimalFloatDeploy.sol";
-import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import {LibRainDeploy} from "rain.deploy/lib/LibRainDeploy.sol";
import {Test} from "forge-std/Test.sol";
import {LibDecimalFloatDeploy} from "src/lib/deploy/LibDecimalFloatDeploy.sol";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/src/lib/deploy/LibDecimalFloatDeployProd.t.sol` at line 7, Remove the
unused import LibRainDeploy from the top of the test file; locate the import
statement referencing LibRainDeploy in LibDecimalFloatDeployProd.t.sol and
delete that import line so the file no longer imports LibRainDeploy (ensure no
other references to LibRainDeploy remain).

@thedavidmeister thedavidmeister merged commit e4b1be7 into main Mar 10, 2026
10 checks passed
@github-actions
Copy link

@coderabbitai assess this PR size classification for the totality of the PR with the following criterias and report it in your comment:

S/M/L PR Classification Guidelines:

This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed.

Small (S)

Characteristics:

  • Simple bug fixes, typos, or minor refactoring
  • Single-purpose changes affecting 1-2 files
  • Documentation updates
  • Configuration tweaks
  • Changes that require minimal context to review

Review Effort: Would have taken 5-10 minutes

Examples:

  • Fix typo in variable name
  • Update README with new instructions
  • Adjust configuration values
  • Simple one-line bug fixes
  • Import statement cleanup

Medium (M)

Characteristics:

  • Feature additions or enhancements
  • Refactoring that touches multiple files but maintains existing behavior
  • Breaking changes with backward compatibility
  • Changes requiring some domain knowledge to review

Review Effort: Would have taken 15-30 minutes

Examples:

  • Add new feature or component
  • Refactor common utility functions
  • Update dependencies with minor breaking changes
  • Add new component with tests
  • Performance optimizations
  • More complex bug fixes

Large (L)

Characteristics:

  • Major feature implementations
  • Breaking changes or API redesigns
  • Complex refactoring across multiple modules
  • New architectural patterns or significant design changes
  • Changes requiring deep context and multiple review rounds

Review Effort: Would have taken 45+ minutes

Examples:

  • Complete new feature with frontend/backend changes
  • Protocol upgrades or breaking changes
  • Major architectural refactoring
  • Framework or technology upgrades

Additional Factors to Consider

When deciding between sizes, also consider:

  • Test coverage impact: More comprehensive test changes lean toward larger classification
  • Risk level: Changes to critical systems bump up a size category
  • Team familiarity: Novel patterns or technologies increase complexity

Notes:

  • the assessment must be for the totality of the PR, that means comparing the base branch to the last commit of the PR
  • the assessment output must be exactly one of: S, M or L (single-line comment) in format of: SIZE={S/M/L}
  • do not include any additional text, only the size classification
  • your assessment comment must not include tips or additional sections
  • do NOT tag me or anyone else on your comment

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 10, 2026

Tip

For best results, initiate chat on the files or code changes.

SIZE=M


🧠 Learnings used
Learnt from: 0xgleb
Repo: rainlanguage/rain.math.float PR: 46
File: .github/workflows/rainix.yaml:4-6
Timestamp: 2025-06-11T10:46:58.363Z
Learning: For GitHub Actions workflows in this repository, the maintainer prefers using `${{ github.ref }}` (full ref path) in the `concurrency.group` key to ensure correct run-cancellation behavior, even if it is less readable than `${{ github.ref_name }}`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant