Skip to content

Bump rain.orderbook submodule to a0ad1955b#55

Merged
findolor merged 1 commit intomainfrom
bump-rain-orderbook
Feb 27, 2026
Merged

Bump rain.orderbook submodule to a0ad1955b#55
findolor merged 1 commit intomainfrom
bump-rain-orderbook

Conversation

@findolor
Copy link
Collaborator

@findolor findolor commented Feb 27, 2026

Motivation

Update the rain.orderbook submodule to pick up recent upstream fixes and features from d9fff37 to a0ad195.

Solution

Bumps lib/rain.orderbook to commit a0ad1955b, which includes:

  • Batch quote WASM binding (#2482)
  • Batch quote research (#2480)
  • Fix lossy float-to-u256 conversion (#2483)

All existing tests pass. Formatter and static analysis clean.

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
    • Updated internal dependencies to latest versions.

Includes batch quote WASM binding, batch quote research,
and fix for lossy float-to-u256 conversion.
@findolor findolor self-assigned this Feb 27, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2026

📝 Walkthrough

Walkthrough

This PR updates the lib/rain.orderbook submodule reference to a newer commit. The change involves updating the submodule pointer from commit d9fff371d75d9d3d25087d20c77209b430a5c248 to commit a0ad1955bb6f4e5cbd32386ec374124d621dffd3 with no functional modifications in this diff.

Changes

Cohort / File(s) Summary
Submodule Update
lib/rain.orderbook
Updated submodule commit reference to a newer version.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A hop, a skip, a submodule's leap,
Dependencies updated, promises to keep,
One line changed, the future stays bright,
Progress marches on through the GitHub night!

🚥 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 clearly and concisely summarizes the main change: bumping the rain.orderbook submodule to a specific commit hash.
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 bump-rain-orderbook

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.

@findolor findolor requested a review from hardyjosh February 27, 2026 10:48
Copy link

@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 `@lib/rain.orderbook`:
- Line 1: Add unit tests that exercise the float-to-u256 conversion function
(e.g., float_to_u256 / u256_from_f64 / convert_float_to_u256) covering normal
values, edge cases, very small/large decimals, and rounding behavior to ensure
the commit fix prevents loss of precision; assert exact expected u256 outputs
for representative decimal inputs. Also add/instrument integration tests that
call the new batch quote WASM binding used by the API layer (e.g., batch_quote,
wasm_batch_quote, or BatchQuote::execute) to validate correct responses for
multiple quotes, error handling, and WASM boundary behavior when invoked via the
API, mocking or wiring the WASM module as in production tests.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0468a1c and 27b4ae1.

📒 Files selected for processing (1)
  • lib/rain.orderbook

@@ -1 +1 @@
Subproject commit d9fff371d75d9d3d25087d20c77209b430a5c248
Subproject commit a0ad1955bb6f4e5cbd32386ec374124d621dffd3
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, check if the submodule exists and its current state
ls -la lib/rain.orderbook/ 2>/dev/null | head -20 || echo "Checking git submodule status..."
git config --file .gitmodules --get-regexp path | grep rain.orderbook || echo "No rain.orderbook submodule found in .gitmodules"

Repository: ST0x-Technology/st0x.rest.api

Length of output: 232


🏁 Script executed:

# Check the git diff for this specific file to see what changed
git diff HEAD -- lib/rain.orderbook 2>/dev/null || git log --oneline -5 -- lib/rain.orderbook 2>/dev/null || echo "Unable to access submodule via git diff"

Repository: ST0x-Technology/st0x.rest.api

Length of output: 55


🏁 Script executed:

# List the overall repository structure to understand context
ls -la lib/ 2>/dev/null | head -20
git ls-files lib/ | head -20

Repository: ST0x-Technology/st0x.rest.api

Length of output: 266


🏁 Script executed:

# Check git status to see what files are being changed
git status lib/rain.orderbook

Repository: ST0x-Technology/st0x.rest.api

Length of output: 138


🏁 Script executed:

# Look at the actual diff for the submodule pointer
git diff --cached -- lib/rain.orderbook 2>/dev/null || git show HEAD:lib/rain.orderbook 2>/dev/null | head -1

Repository: ST0x-Technology/st0x.rest.api

Length of output: 55


🏁 Script executed:

# Check if there's a git submodule and its URL
git config --get submodule.lib/rain.orderbook.url
git ls-remote --heads $(git config --get submodule.lib/rain.orderbook.url) 2>/dev/null | wc -l || echo "Unable to reach remote"

Repository: ST0x-Technology/st0x.rest.api

Length of output: 75


🏁 Script executed:

# Get the exact commit pointer update in this PR/diff
git diff HEAD~1 HEAD -- lib/rain.orderbook 2>/dev/null || echo "Checking git log for submodule changes..."
git log -p --all -S "a0ad1955bb6f4e5cbd32386ec374124d621dffd3" -- lib/rain.orderbook 2>/dev/null | head -30 || echo "Not in recent history"

Repository: ST0x-Technology/st0x.rest.api

Length of output: 114


🏁 Script executed:

# Check what the current state of lib/rain.orderbook pointer is
cat lib/rain.orderbook/.git 2>/dev/null || git ls-files -s lib/rain.orderbook

Repository: ST0x-Technology/st0x.rest.api

Length of output: 141


🏁 Script executed:

# Check git log to see if there were recent changes to submodule pointers
git log --oneline -10 2>/dev/null
git log --all --oneline lib/rain.orderbook 2>/dev/null | head -10

Repository: ST0x-Technology/st0x.rest.api

Length of output: 317


🏁 Script executed:

# Examine if this is a PR diff - check FETCH_HEAD
git show FETCH_HEAD:lib/rain.orderbook 2>/dev/null || echo "No FETCH_HEAD submodule"

Repository: ST0x-Technology/st0x.rest.api

Length of output: 96


🏁 Script executed:

# List all changed files in the current diff
git diff HEAD^ HEAD --name-only 2>/dev/null || git show --name-only 2>/dev/null | head -20

Repository: ST0x-Technology/st0x.rest.api

Length of output: 510


🏁 Script executed:

# Verify the old commit hash mentioned in the review
git log --all --oneline | grep -i "rain.orderbook" | head -5
git show 27b4ae1 --stat | head -30

Repository: ST0x-Technology/st0x.rest.api

Length of output: 1922


🏁 Script executed:

# Check if there are any tests or CI configuration changes that might indicate test coverage
git show 27b4ae1 -- .github/workflows/ 2>/dev/null | head -50 || echo "No workflow changes in this commit"

Repository: ST0x-Technology/st0x.rest.api

Length of output: 1217


Ensure test coverage for float-to-u256 conversion fix and batch quote WASM binding.

The submodule update to commit a0ad1955b includes a fix for lossy float-to-u256 conversion, which could have previously caused silent precision loss in financial calculations. Verify that this fix is covered by tests that validate correct conversion of decimal values, especially edge cases and rounding behavior.

Additionally, the new batch quote WASM binding should be tested in your integration tests to ensure it functions correctly when called from this API layer.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/rain.orderbook` at line 1, Add unit tests that exercise the float-to-u256
conversion function (e.g., float_to_u256 / u256_from_f64 /
convert_float_to_u256) covering normal values, edge cases, very small/large
decimals, and rounding behavior to ensure the commit fix prevents loss of
precision; assert exact expected u256 outputs for representative decimal inputs.
Also add/instrument integration tests that call the new batch quote WASM binding
used by the API layer (e.g., batch_quote, wasm_batch_quote, or
BatchQuote::execute) to validate correct responses for multiple quotes, error
handling, and WASM boundary behavior when invoked via the API, mocking or wiring
the WASM module as in production tests.

@findolor findolor merged commit ceb5177 into main Feb 27, 2026
4 checks passed
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