Skip to content

Pin versioned deploy constants per soldeer tag (dex pattern)#246

Merged
thedavidmeister merged 4 commits into
mainfrom
2026-06-20-versioned-deploy-constants
Jun 21, 2026
Merged

Pin versioned deploy constants per soldeer tag (dex pattern)#246
thedavidmeister merged 4 commits into
mainfrom
2026-06-20-versioned-deploy-constants

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

What

Adopt raindex's versioned deploy-constants pattern, matching the soldeer-published versions.

Why

LibDecimalFloatDeployProd.t.sol forks each chain and asserts the deployed DecimalFloat / log-tables address+codehash equal the constants in LibDecimalFloatDeploy.sol, while LibDecimalFloatDeploy.t.sol deploys the current bytecode and asserts it equals those same constants. So any source change to the deployed contracts forces bumping the single "current" constant (to satisfy the local test), which makes the prod fork test red until the new bytecode is deployed — the premerge chicken-and-egg.

Pinning a frozen constant suite per published soldeer tag (like raindex's LibRaindexDeploy.sol + LibRaindexDeployTaggedConstants.t.sol) records each release's deployment independently of the current bytecode, and a registry-backed completeness test enforces that every published tag stays pinned. Deploying remains the routine deterministic-Zoltu step (Manual sol artifacts).

Changes (additive — no bytecode change)

  • LibDecimalFloatDeploy.sol — frozen *_0_1_1 constants for the published 0.1.1 soldeer tag (log tables + DecimalFloat address & codehash), pinned as literals so they keep referencing 0.1.1 after the current constants advance.
  • script/check-published-deploy-constants.sh — queries api.soldeer.xyz for every published rain-math-float version and lists any tag missing its suite (OK / MISSING:… / SKIP when unreachable).
  • test/src/lib/deploy/LibDecimalFloatDeployTaggedConstants.t.sol — FFI test asserting OK; vm.skip on SKIP.

Validation

  • forge build ✓, forge fmt --check
  • testAllPublishedSoldeerTagsHaveAFullConstantSuite ✓ (registry → 0.1.1 → suite present → OK)
  • testDeployAddress / testDeployAddressLogTables ✓ (additive, no bytecode change)

Note: this PR doesn't by itself flip a bytecode-changing PR's fork prod test green — that's resolved by deploying (the easy deterministic step). It establishes the versioned-constant discipline + a premerge completeness gate, faithful to dex.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests

    • Added a test that checks every published version has a complete suite of pinned deployment constants, skipping gracefully when published version data can’t be fetched.
  • Chores

    • Added a validation script that queries published versions and verifies expected address/hash constants are present for each version.
  • New Features

    • Added frozen, version-pinned deployment constants for the 0.1.1 soldeer tag (log tables and DecimalFloat addresses and code hashes).

Adopt raindex's versioned-deploy-constants pattern so a bytecode-changing PR
isn't blocked on the single "current" deploy constant. Today any source change
to the deployed contracts forces bumping ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS /
DECIMAL_FLOAT_CONTRACT_HASH, which then makes LibDecimalFloatDeployProd red
until the new bytecode is deployed — a premerge chicken-and-egg. Pinning a
frozen constant suite per published soldeer tag records each release so the
deploy verification tracks published versions, not the bleeding edge.

- LibDecimalFloatDeploy.sol: add frozen *_0_1_1 deploy constants for the
  published 0.1.1 soldeer tag (log tables + DecimalFloat address/codehash).
- script/check-published-deploy-constants.sh: query the soldeer registry and
  list any published tag missing its pinned suite (prints OK/MISSING/SKIP).
- LibDecimalFloatDeployTaggedConstants.t.sol: FFI test asserting every
  published tag has its full suite; skips if the registry is unreachable.

Additive only (no bytecode change) — existing deploy/prod tests are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this Jun 20, 2026
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@thedavidmeister, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 57 minutes and 47 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6c782310-cfae-4fee-a3f6-b342b4dcb362

📥 Commits

Reviewing files that changed from the base of the PR and between 8f46ba7 and 60e042c.

📒 Files selected for processing (1)
  • src/lib/deploy/LibDecimalFloatDeploy.sol

Walkthrough

Adds four frozen deployment constants (addresses and codehashes for log tables and DecimalFloat) pinned to soldeer tag 0.1.1 in LibDecimalFloatDeploy.sol. Introduces a shell script that fetches published soldeer versions and verifies each has corresponding constants in the contract file. A new Forge test runs the script via vm.ffi and asserts the output is OK, skipping when the registry is unreachable.

Changes

Version-pinned Deploy Constants and Coverage Enforcement

Layer / File(s) Summary
Frozen 0.1.1 deployment constants
src/lib/deploy/LibDecimalFloatDeploy.sol
Adds four _0_1_1-suffixed constants pinned to soldeer tag 0.1.1: log tables address/codehash and DecimalFloat address/codehash, alongside existing non-pinned constants.
Soldeer version coverage script and Forge test
script/check-published-deploy-constants.sh, test/src/lib/deploy/LibDecimalFloatDeployTaggedConstants.t.sol
Shell script fetches published soldeer versions via curl, converts version dots to underscores, and greps for each required constant in LibDecimalFloatDeploy.sol, printing OK, MISSING: <names>, or SKIP: .... Forge test invokes it via vm.ffi, skips on SKIP prefix (unreachable registry), and asserts OK otherwise.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: pinning versioned deploy constants tied to specific soldeer tags, following the dex pattern referenced in objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-06-20-versioned-deploy-constants

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.

@thedavidmeister

Copy link
Copy Markdown
Contributor Author

Companion org-wide enforcement: rainlanguage/rain-org-health#4 adds a deploy-constants-unversioned health check that flags any deploy repo missing this versioned-constants pattern (this repo clears it once #246 lands).

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@script/check-published-deploy-constants.sh`:
- Around line 20-23: The curl command in the versions variable assignment lacks
timeout configuration, which can cause the script to hang indefinitely if the
network connection stalls. Add `--connect-timeout` and `--max-time` flags to the
curl command that calls the Soldeer API endpoint for rain-math-float to ensure
the request fails gracefully if the network is unresponsive, preventing the test
run from hanging.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d2e46c5e-be3b-4baa-a8af-4bbb941d1102

📥 Commits

Reviewing files that changed from the base of the PR and between f69622d and baf2b25.

📒 Files selected for processing (3)
  • script/check-published-deploy-constants.sh
  • src/lib/deploy/LibDecimalFloatDeploy.sol
  • test/src/lib/deploy/LibDecimalFloatDeployTaggedConstants.t.sol

Comment thread script/check-published-deploy-constants.sh
claude and others added 2 commits June 20, 2026 19:08
A stalled registry call could otherwise hang the FFI test indefinitely.
--connect-timeout/--max-time + a bounded retry. (CodeRabbit)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@thedavidmeister

Copy link
Copy Markdown
Contributor Author

Human-approved (thedavidmeister, sha fbf9de3); merging.

@thedavidmeister

Copy link
Copy Markdown
Contributor Author

human-approved; merging (admin: only failing checks are testProdDeployment* — DecimalFloat not deployed on prod chains, a known deploy-pinned condition unrelated to this PR's diff)

@thedavidmeister thedavidmeister merged commit 5d9d547 into main Jun 21, 2026
8 of 9 checks passed
@thedavidmeister thedavidmeister deleted the 2026-06-20-versioned-deploy-constants branch June 21, 2026 04:02
@github-actions

Copy link
Copy Markdown

@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

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Tip

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

SIZE=M

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.

2 participants