Skip to content

Conversation

@thedavidmeister
Copy link
Contributor

@thedavidmeister thedavidmeister commented Sep 9, 2025

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
    • Updated internal dependency references to newer revisions and adjusted macOS library paths; minor formatting cleanup.
  • Bug Fixes / UI
    • Standardized numeric string formatting across orders, vaults, trades, and balance-change displays; only textual representations changed, numeric values preserved.
  • Tests
    • Updated tests and expectations to match new display formatting.
  • Notes
    • No functional API behavior or public signatures affecting end-user workflows.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 9, 2025

Walkthrough

Updated two submodule pointers and replaced numerous format18() calls with format() across multiple Rust files and tests; minor config path updates and a trailing newline addition. No public API signature changes or control-flow modifications.

Changes

Cohort / File(s) Summary
Submodules
lib/rain.orderbook.interface, lib/rain.interpreter
Updated submodule pointers: lib/rain.orderbook.interface moved from 21f3e97... to 71612d2...; lib/rain.interpreter moved from 474fc03... to a18536e.... No in-repo source changes.
Raindex client formatting
crates/common/src/raindex_client/order_quotes.rs, crates/common/src/raindex_client/vaults.rs
Replaced format18() calls with format() for numeric display fields (inverse_ratio, max_output, max_input, ratio, and multiple balance fields). No control-flow or signature changes.
Flattened types formatting
crates/common/src/types/order_takes_list_flattened.rs, crates/common/src/types/token_vault_flattened.rs, crates/common/src/types/vault_balance_change_flattened.rs
Switched generation of *_display/balance_display/amount_display_signed from format18() to format(). Tests updated where expected string output changed.
JS API / typings & tests
packages/orderbook/test/js_api/raindexClient.test.ts, dist/cjs/index.d.ts
Tests and distributed typings updated to reflect renamed formatting methods: * .format18()* .format() (e.g., Balance.format18()Balance.format()).
Tauri config
tauri-app/src-tauri/tauri.conf.json
Replaced relative macOS framework dylib paths with absolute Nix store paths under tauri.bundle.macOS.frameworks.
Minor formatting
script/DiagOrder.sol
Added trailing newline after final closing brace; no semantic changes.

Sequence Diagram(s)

(omitted) — changes are formatting, tests, and submodule pointer updates only; no control-flow or interaction changes to visualize.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • hardyjosh
  • findolor

Pre-merge checks (2 passed, 1 warning)

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The current title “ob int” is too vague and does not convey the primary work in this changeset, which centers on refactoring numeric formatting from format18() to format() across multiple crates, updating tests, and bumping submodule pointers. It fails to provide context or meaning to reviewers scanning the pull request history. Please update the pull request title to succinctly reflect the main change—for example, “Replace format18() with format() for numeric value formatting and update submodule references”—so that it clearly communicates the intent and scope of this PR.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 2025-09-09-int

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 52d48a1 and b413711.

📒 Files selected for processing (1)
  • lib/rain.orderbook.interface (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1913
File: Cargo.toml:55-55
Timestamp: 2025-06-06T16:38:04.182Z
Learning: In rain.orderbook repository, during PR chains involving dependency updates, wasm-bindgen-utils may temporarily point to git commits that don't contain the full required functionality, with the understanding that subsequent PRs in the chain will update it to the correct commit.
📚 Learning: 2025-07-16T10:40:05.717Z
Learnt from: findolor
PR: rainlanguage/rain.orderbook#2000
File: crates/common/src/raindex_client/vaults.rs:183-183
Timestamp: 2025-07-16T10:40:05.717Z
Learning: In the rainlanguage/rain.orderbook codebase, user findolor considers breaking changes from Option<U256> to U256 for required fields like decimals in RaindexVaultToken to be acceptable and safe, even when they affect multiple usage sites across the codebase.

Applied to files:

  • lib/rain.orderbook.interface
📚 Learning: 2025-07-04T09:02:57.301Z
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1956
File: crates/common/src/fuzz/mod.rs:64-64
Timestamp: 2025-07-04T09:02:57.301Z
Learning: In rainlanguage/rain.orderbook, user findolor prefers to limit type consistency changes to only the parts directly related to the current work scope. For example, when updating chain_id fields from u64 to u32 in fuzz-related code, unrelated files like tauri-app wallet commands can remain as u64 if they serve different purposes and aren't part of the current changes.

Applied to files:

  • lib/rain.orderbook.interface
📚 Learning: 2025-06-18T12:54:47.807Z
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1938
File: crates/js_api/src/raindex/orders.rs:1-11
Timestamp: 2025-06-18T12:54:47.807Z
Learning: In the rain.orderbook repository, findolor prefers to keep unused imports in place when they will be used in upcoming follow-up PRs, rather than removing and re-adding them during incremental development.

Applied to files:

  • lib/rain.orderbook.interface

@@ -1 +1 @@
Subproject commit 21f3e97c033e1533641be27f7b21e9f828b42ce8
Subproject commit 71612d2bb8fc2e10047f557e9c8c30ab103b35b0
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Submodule bump: verify 71612d2 provenance and surface the delta

Please confirm this SHA is from the intended upstream branch/tag and that the delta is expected. Add a brief Motivation/Solution in the PR body linking to the upstream changes or tag for traceability. If this is an interim pointer as part of a PR chain (per prior repo practice), call that out explicitly to avoid confusion.

Run this to inspect old vs new submodule SHAs, URL, and the changelog between them:

Follow-ups:

  • If the range includes breaking changes, note any required downstream updates in this repo.
  • Consider referencing a signed tag/release in the PR description for reproducibility, even while pinning to a commit.

🏁 Script executed:

#!/bin/bash
set -euo pipefail

SUBPATH="lib/rain.orderbook.interface"

# Ensure we have the base to compare against
git fetch origin main --quiet

BASE_COMMIT="$(git merge-base HEAD origin/main)"
OLD_SHA="$(git ls-tree "$BASE_COMMIT" "$SUBPATH" | awk '{print $3}')"
NEW_SHA="$(git ls-tree HEAD "$SUBPATH" | awk '{print $3}')"

echo "Submodule: $SUBPATH"
git config -f .gitmodules --get "submodule.$SUBPATH.url" || true
echo "OLD: $OLD_SHA (from origin/main)"
echo "NEW: $NEW_SHA (from HEAD)"

# Initialize and fetch the submodule to view logs
git submodule update --init --depth 1 "$SUBPATH"
git -C "$SUBPATH" fetch --depth 500 origin

echo
echo "Log (OLD..NEW):"
git -C "$SUBPATH" log --oneline --decorate --graph "$OLD_SHA".."$NEW_SHA" -n 100 || true

echo
echo "Potential breaking markers:"
git -C "$SUBPATH" log --oneline "$OLD_SHA".."$NEW_SHA" | rg -nP '(?i)breaking|feat|fix' || true

Length of output: 765


Submodule bump verified—commit 71612d2 from upstream main
No breaking-change markers found between 21f3e97 and 71612d2. Please add a brief Motivation/Solution to the PR description linking to upstream PR #40 (2025-09-09-int) for traceability and call out if this is an interim pointer.

🤖 Prompt for AI Agents
In lib/rain.orderbook.interface around lines 1 to 1, the PR lacks a brief
Motivation/Solution note and traceability to the upstream change; update the PR
description to include a short "Motivation" and "Solution" section that
references upstream PR #40 (commit 71612d2) with the date (2025-09-09-int),
state whether this is an interim pointer or a final change, and link or cite the
upstream commit/PR for traceability.

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: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b413711 and 3898fef.

📒 Files selected for processing (1)
  • lib/rain.interpreter (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1913
File: Cargo.toml:55-55
Timestamp: 2025-06-06T16:38:04.182Z
Learning: In rain.orderbook repository, during PR chains involving dependency updates, wasm-bindgen-utils may temporarily point to git commits that don't contain the full required functionality, with the understanding that subsequent PRs in the chain will update it to the correct commit.
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1938
File: crates/js_api/src/raindex/orders.rs:1-11
Timestamp: 2025-06-18T12:54:47.807Z
Learning: In the rain.orderbook repository, findolor prefers to keep unused imports in place when they will be used in upcoming follow-up PRs, rather than removing and re-adding them during incremental development.
Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T23:09:46.344Z
Learning: For PR #1884 in rainlanguage/rain.orderbook, I must reassess the PR size after each new commit to ensure the report includes the latest changes, and calculate the total size up to the very latest commit.
⏰ 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). (10)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-rs-artifacts, true)
  • GitHub Check: git-clean
  • GitHub Check: standard-tests (ubuntu-latest, rainix-wasm-test)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-wasm-artifacts)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-static)
  • GitHub Check: standard-tests (ubuntu-latest, ob-rs-test, true)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-test)
  • GitHub Check: test
  • GitHub Check: Deploy-Preview-Push
  • GitHub Check: Deploy-Docs-Preview
🔇 Additional comments (1)
lib/rain.interpreter (1)

1-1: Ensure CI workflows checkout submodules recursively after bumping rain.interpreter to a18536e48177b46e6611f8180729ba1519504a11

  • Verified new commit is reachable upstream and git submodule update --init --recursive succeeds
  • Changelog (474fc037…→a18536e48177):
    • 97c01965 fix test
    • 4d1fd239 pionters
    • 71bbbffc bump int
    • e5a3f58e Update rain.metadata
  • No tags contain the new commit
  • CI workflows currently lack explicit submodule recursion—add under your actions/checkout step in .github/workflows:
    - uses: actions/checkout@v3
      with:
        submodules: recursive

[mandatory_fixes_required]

@@ -1 +1 @@
Subproject commit 474fc0374534388993d0b712673a476636eb5488
Subproject commit a18536e48177b46e6611f8180729ba1519504a11
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

PR hygiene: fill Motivation/Solution and checkboxes for this submodule-only change.

Add 1–2 lines on why this commit is needed (bugfix, perf, API alignment) and any downstream risk. Link the upstream interpreter commit/PR to speed review. Not blocking, but it helps traceability.

I can draft the PR description and a release-note entry if you share the intent of this bump.

🤖 Prompt for AI Agents
In lib/rain.interpreter around lines 1 to 1, the commit/PR lacks a short
Motivation/Solution and checkbox verification for this submodule-only bump;
update the PR description (or commit message) to add 1–2 lines stating why the
bump is required (bugfix, perf, API alignment), note any downstream risk, and
include a link to the upstream interpreter commit/PR for traceability; also
complete the requested checkboxes (e.g., tests, changelog, release notes) or
mark them as not applicable so the PR passes hygiene checks.

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: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e570cc8 and 331cb72.

📒 Files selected for processing (2)
  • crates/common/src/raindex_client/vaults.rs (3 hunks)
  • crates/common/src/types/token_vault_flattened.rs (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
crates/**/{src,tests,benches,examples}/**/*.rs

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

crates/**/{src,tests,benches,examples}/**/*.rs: Rust crates: lint with cargo clippy --workspace --all-targets --all-features -D warnings
Rust crates: ensure cargo test --workspace passes
Rust crates: build with cargo build during development/readiness checks

Files:

  • crates/common/src/raindex_client/vaults.rs
  • crates/common/src/types/token_vault_flattened.rs
🧠 Learnings (5)
📓 Common learnings
Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T21:26:31.566Z
Learning: For PR #1884 and future PRs in rainlanguage/rain.orderbook repository, provide PR size reports in a separate comment with ONLY the exact format "TOTAL=number\nADDITIONS=number\nDELETIONS=number", without any additional text or explanation. Reports should exclude irrelevant files such as lock files (package-lock.json, yarn.lock, pnpm-lock.yaml, cargo.lock).
📚 Learning: 2025-07-16T10:40:05.717Z
Learnt from: findolor
PR: rainlanguage/rain.orderbook#2000
File: crates/common/src/raindex_client/vaults.rs:183-183
Timestamp: 2025-07-16T10:40:05.717Z
Learning: In the rainlanguage/rain.orderbook codebase, user findolor considers breaking changes from Option<U256> to U256 for required fields like decimals in RaindexVaultToken to be acceptable and safe, even when they affect multiple usage sites across the codebase.

Applied to files:

  • crates/common/src/raindex_client/vaults.rs
📚 Learning: 2025-07-16T05:52:05.576Z
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1994
File: crates/common/src/raindex_client/vaults.rs:59-59
Timestamp: 2025-07-16T05:52:05.576Z
Learning: User findolor prefers to handle documentation updates for getter methods in batch via dedicated PRs rather than addressing them individually during feature development, as mentioned for the formatted amount string fields in crates/common/src/raindex_client/vaults.rs.

Applied to files:

  • crates/common/src/raindex_client/vaults.rs
📚 Learning: 2025-07-21T16:34:31.193Z
Learnt from: 0xgleb
PR: rainlanguage/rain.orderbook#1911
File: crates/subgraph/src/types/impls.rs:7-15
Timestamp: 2025-07-21T16:34:31.193Z
Learning: In the rainlanguage/rain.orderbook codebase, user 0xgleb considers breaking changes that remove unsafe default behaviors to be intentional and acceptable. Specifically, the get_decimals() method in crates/subgraph/src/types/impls.rs was intentionally changed to return MissingDecimals error instead of defaulting to 18 decimals, as defaulting to 18 is considered unsafe and should never have been done.

Applied to files:

  • crates/common/src/raindex_client/vaults.rs
📚 Learning: 2025-06-20T07:51:08.790Z
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1941
File: crates/js_api/src/raindex/vaults.rs:175-181
Timestamp: 2025-06-20T07:51:08.790Z
Learning: In the RaindexClient vault methods, `&self` parameters are intentionally kept for API consistency to make all vault operations instance methods, even when the methods don't use client state. This is a design preference for maintaining a uniform interface.

Applied to files:

  • crates/common/src/raindex_client/vaults.rs
🧬 Code graph analysis (1)
crates/common/src/types/token_vault_flattened.rs (1)
crates/common/src/raindex_client/vaults.rs (4)
  • balance (103-105)
  • balance (145-147)
  • balance (184-187)
  • balance (195-197)
⏰ 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). (17)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-artifacts)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-legal)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-wasm-test)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-wasm-artifacts)
  • GitHub Check: standard-tests (ubuntu-latest, ob-rs-test, true)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-static)
  • GitHub Check: standard-tests (ubuntu-latest, test-js-bindings)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-rs-static)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-test)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-rs-artifacts, true)
  • GitHub Check: test
  • GitHub Check: test
  • GitHub Check: Deploy-Preview-Push
  • GitHub Check: build-tauri (ubuntu-22.04, true)
  • GitHub Check: git-clean
  • GitHub Check: test
  • GitHub Check: Deploy-Docs-Preview
🔇 Additional comments (3)
crates/common/src/types/token_vault_flattened.rs (2)

229-229: Test update matches new formatting behavior.

Expectation updated to scientific notation is correct for high-precision input.


26-26: Confirmed downstream Rust consumers pass through balance_display verbatim, supporting scientific notation.

crates/common/src/raindex_client/vaults.rs (1)

1183-1184: Confirm Float::format() always produces fixed-decimal strings — TS tests assert exact formattedBalance values (e.g. '1.5', '0.000000000000001') and no parseFloat/Number calls target formattedBalance; ensure no exponent notation is ever emitted.

Comment on lines +712 to 715
let formatted_amount = amount.format()?;
let formatted_new_balance = new_balance.format()?;
let formatted_old_balance = old_balance.format()?;

Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Use of Float::format() for amount/new/old: consistent and safer than assuming 18 decimals.

Looks good and consistent with the broader change away from format18(). Please ensure UI/consumers of formatted_* tolerate exponent form (no fixed decimal guarantee).

Consider documenting on the RaindexVaultBalanceChange fields that formatted_* may be in scientific notation to set expectations for clients.

Also applies to: 744-747

🤖 Prompt for AI Agents
In crates/common/src/raindex_client/vaults.rs around lines 712-715 (and also
update the similar code at 744-747), the code now uses Float::format() to
produce formatted_amount/formatted_new_balance/formatted_old_balance which may
emit scientific/exponent notation; ensure downstream UI/consumers tolerate
exponent form and document this behavior on the RaindexVaultBalanceChange
fields. Update the struct/comments for RaindexVaultBalanceChange to state that
formatted_* strings may be in scientific notation (no fixed decimal guarantee),
and add/adjust any nearby callers or tests to accept exponent-formatted strings
(or normalize them where needed) so the change does not break consumers.

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: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 331cb72 and c77e595.

📒 Files selected for processing (3)
  • packages/orderbook/test/js_api/raindexClient.test.ts (6 hunks)
  • script/DiagOrder.sol (1 hunks)
  • tauri-app/src-tauri/tauri.conf.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
packages/orderbook/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

packages/orderbook/**/*.{ts,tsx}: Orderbook package: build with npm run build:orderbook
Orderbook package: type/lint check with npm run check -w @rainlanguage/orderbook
Orderbook package: run tests with npm run test -w @rainlanguage/orderbook

Files:

  • packages/orderbook/test/js_api/raindexClient.test.ts
🧠 Learnings (6)
📓 Common learnings
Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T21:26:31.566Z
Learning: For PR #1884 and future PRs in rainlanguage/rain.orderbook repository, provide PR size reports in a separate comment with ONLY the exact format "TOTAL=number\nADDITIONS=number\nDELETIONS=number", without any additional text or explanation. Reports should exclude irrelevant files such as lock files (package-lock.json, yarn.lock, pnpm-lock.yaml, cargo.lock).
📚 Learning: 2025-05-14T17:13:13.878Z
Learnt from: 0xgleb
PR: rainlanguage/rain.orderbook#1776
File: tauri-app/src-tauri/tauri.conf.json:56-59
Timestamp: 2025-05-14T17:13:13.878Z
Learning: Tauri configuration (tauri.conf.json) does not support environment variable interpolation in framework paths for macOS. Using syntax like ${VAR}/lib.dylib will result in a literal "Library not found" error with that exact string.

Applied to files:

  • tauri-app/src-tauri/tauri.conf.json
📚 Learning: 2025-05-14T17:13:13.878Z
Learnt from: 0xgleb
PR: rainlanguage/rain.orderbook#1776
File: tauri-app/src-tauri/tauri.conf.json:56-59
Timestamp: 2025-05-14T17:13:13.878Z
Learning: Tauri configuration (tauri.conf.json) does not support environment variable interpolation in framework paths. Using syntax like ${VAR}/lib.dylib will result in a literal "Library not found" error with that exact string.

Applied to files:

  • tauri-app/src-tauri/tauri.conf.json
📚 Learning: 2025-08-04T09:07:00.160Z
Learnt from: findolor
PR: rainlanguage/rain.orderbook#2048
File: packages/webapp/src/__tests__/WithdrawModal.test.ts:36-37
Timestamp: 2025-08-04T09:07:00.160Z
Learning: In packages/webapp/src/__tests__/WithdrawModal.test.ts and similar test files, findolor considers it acceptable to directly unwrap .value from Float.fromFixedDecimal() and Float.parse() calls without explicit error handling, preferring to keep test fixtures simple rather than adding comprehensive error checking.

Applied to files:

  • packages/orderbook/test/js_api/raindexClient.test.ts
📚 Learning: 2025-06-04T10:21:01.388Z
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1907
File: packages/orderbook/test/common/test.test.ts:75-77
Timestamp: 2025-06-04T10:21:01.388Z
Learning: The DotrainOrder.create API in packages/orderbook/test/common/test.test.ts is internal and not used directly in consumer applications, so API changes here don't require external breaking change documentation.

Applied to files:

  • packages/orderbook/test/js_api/raindexClient.test.ts
📚 Learning: 2025-09-06T07:12:25.751Z
Learnt from: CR
PR: rainlanguage/rain.orderbook#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-06T07:12:25.751Z
Learning: Applies to packages/orderbook/**/*.{ts,tsx} : Orderbook package: run tests with `npm run test -w rainlanguage/orderbook`

Applied to files:

  • packages/orderbook/test/js_api/raindexClient.test.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). (17)
  • GitHub Check: build-tauri (ubuntu-22.04, true)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-rs-artifacts, true)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-legal)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-artifacts)
  • GitHub Check: test
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-test)
  • GitHub Check: standard-tests (ubuntu-latest, test-js-bindings)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-wasm-artifacts)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-rs-static)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-wasm-test)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-static)
  • GitHub Check: standard-tests (ubuntu-latest, ob-rs-test, true)
  • GitHub Check: git-clean
  • GitHub Check: test
  • GitHub Check: test
  • GitHub Check: Deploy-Docs-Preview
  • GitHub Check: Deploy-Preview-Push
🔇 Additional comments (2)
script/DiagOrder.sol (1)

19-19: Trailing newline only — OK

No functional change.

packages/orderbook/test/js_api/raindexClient.test.ts (1)

568-568: API rename to format(): tests updated; no format18() remaining
All format18() calls have been removed and tests now use .format(). Build the package and confirm that the generated .d.ts (e.g. index.d.ts) exposes .format() on the relevant types.

@thedavidmeister thedavidmeister merged commit f4049c0 into main Sep 10, 2025
19 checks passed
@github-actions
Copy link
Contributor

@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 Sep 10, 2025

Tip

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

SIZE=M


🧠 Learnings used
Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T21:24:42.275Z
Learning: For PR #1884, after each commit review, I should provide a new comment with a PR size report in the format: `TOTAL=number ADDITIONS=number DELETIONS=number`, excluding irrelevant files such as lock files (package-lock.json, cargo.lock, etc.).

Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T21:24:42.275Z
Learning: After each commit in PR #1884, I should provide a new comment with the PR size report in the format: `TOTAL=number ADDITIONS=number DELETIONS=number`. The report should exclude irrelevant files such as lock files (e.g., package-lock.json, cargo.lock).

Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T21:25:47.873Z
Learning: After each new commit review for rainlanguage/rain.orderbook repository, generate a PR size report in a separate comment with the format: "TOTAL=number ADDITIONS=number DELETIONS=number". This report should exclude irrelevant files such as lock files (e.g., package-lock.json, cargo.lock).

Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T21:25:47.873Z
Learning: After each new commit review for rainlanguage/rain.orderbook repository, generate a PR size report in a separate comment with the exact format: "TOTAL=number\nADDITIONS=number\nDELETIONS=number". This report should exclude irrelevant files such as lock files (package-lock.json, yarn.lock, pnpm-lock.yaml, cargo.lock).

Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T22:14:22.646Z
Learning: For PR #1884 in rainlanguage/rain.orderbook, I must consistently report the PR size after EVERY new commit in the exact format "TOTAL=number\nADDITIONS=number\nDELETIONS=number" without any formatting blocks. The report must exclude lock files (package-lock.json, yarn.lock, pnpm-lock.yaml, cargo.lock) and can be included either as part of the review or as a separate comment.

Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T22:14:22.646Z
Learning: For PR #1884 in rainlanguage/rain.orderbook, I must consistently report the PR size after EVERY new commit in the exact format "TOTAL=number\nADDITIONS=number\nDELETIONS=number" without any additional text or formatting blocks. The report must exclude lock files (package-lock.json, yarn.lock, pnpm-lock.yaml, cargo.lock) and can be included either as part of the review or as a separate comment.

Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T22:46:08.530Z
Learning: For PR #1884 in rainlanguage/rain.orderbook, the PR size report should be the only content in the comment - no text before it, no text after it, no formatting blocks, just the raw report in the exact format: "TOTAL=number\nADDITIONS=number\nDELETIONS=number". The report must exclude lock files (package-lock.json, yarn.lock, pnpm-lock.yaml, cargo.lock).

Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T21:24:53.708Z
Learning: For PR #1884 in rainlanguage/rain.orderbook, provide a separate comment after each review with PR size statistics in the format: `TOTAL=number ADDITIONS=number DELETIONS=number`, excluding lock files like package-lock.json and cargo.lock.

Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T21:24:53.708Z
Learning: For PR #1884 in rainlanguage/rain.orderbook, provide a separate comment after each review with PR size statistics in the format: `TOTAL=number ADDITIONS=number DELETIONS=number`, excluding lock files like package-lock.json and cargo.lock.

Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T21:24:53.708Z
Learning: For PR #1884 in rainlanguage/rain.orderbook, provide a separate comment after each review with PR size statistics in the format: `TOTAL=number ADDITIONS=number DELETIONS=number`, excluding lock files like package-lock.json and cargo.lock.

Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T21:26:31.566Z
Learning: For PR #1884 and future PRs in rainlanguage/rain.orderbook repository, provide PR size reports in a separate comment with ONLY the exact format "TOTAL=number\nADDITIONS=number\nDELETIONS=number", without any additional text or explanation. Reports should exclude irrelevant files such as lock files (package-lock.json, yarn.lock, pnpm-lock.yaml, cargo.lock).

This was referenced Sep 10, 2025
@coderabbitai coderabbitai bot mentioned this pull request Sep 30, 2025
4 tasks
@coderabbitai coderabbitai bot mentioned this pull request Oct 10, 2025
4 tasks
@coderabbitai coderabbitai bot mentioned this pull request Oct 30, 2025
4 tasks
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.

3 participants