Skip to content

Add EventPipeline logic#2269

Merged
findolor merged 9 commits intomainfrom
local-db-events-pipeline
Nov 4, 2025
Merged

Add EventPipeline logic#2269
findolor merged 9 commits intomainfrom
local-db-events-pipeline

Conversation

@findolor
Copy link
Copy Markdown
Collaborator

@findolor findolor commented Oct 24, 2025

Motivation

See issues:

Solution

  • Add EventPipeline

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

  • New Features

    • New event pipeline adapter that supports multiple RPC backends (standard RPCs and HyperRPC) for more reliable event fetching and decoding.
    • Exposed public helpers for sync status and table clearing allowing UI and tooling to query sync state without a local client instance.
  • Refactor

    • Shifted sync and fetch flows to use an explicit RPC client abstraction and reorganized pipeline modules to simplify integration.
  • Tests

    • Added tests covering adapter construction and error/decoding paths.

@findolor findolor added this to the LocalDB Implementation milestone Oct 24, 2025
@findolor findolor requested review from 0xgleb and hardyjosh October 24, 2025 12:39
@findolor findolor self-assigned this Oct 24, 2025
@findolor findolor changed the base branch from main to local-db-sync-traits October 24, 2025 12:39
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 24, 2025

Walkthrough

Introduces a DefaultEventsPipeline adapter and converts LocalDb-bound event fetch/decode APIs into RpcClient-based free functions; many modules and CLI/web bindings switched from LocalDb to RpcClient and new public pipeline/raindex_client free functions.

Changes

Cohort / File(s) Summary
Events pipeline adapter
crates/common/src/local_db/pipeline/adapters/events.rs
New DefaultEventsPipeline implementing EventsPipeline, with constructors (with_regular_rpcs, with_hyperrpc) and methods delegating latest_block, fetch_orderbook, fetch_stores, and decode to RpcClient-backed fetch/decode functions. Tests added for constructors and decode error propagation.
Pipeline module exposure
crates/common/src/local_db/pipeline/mod.rs, crates/common/src/local_db/pipeline/adapters/mod.rs
Added pub mod adapters; and pub mod events; to expose new adapter module.
Fetch API: LocalDb → RpcClient free functions
crates/common/src/local_db/fetch.rs
Migrated LocalDb methods to free functions accepting &RpcClient (collect_logs, fetch_orderbook_events, fetch_store_events, fetch_block_timestamps, backfill_missing_timestamps, fetch_logs_for_filters, build_log_filters, sort_events_by_block_and_log, helpers). Updated imports and tests.
Sync flow & data source refactor
crates/cli/src/commands/local_db/sync/data_source.rs, crates/common/src/local_db/sync.rs
Replaced LocalDb usage with RpcClient for SyncDataSource/SyncRunner flows; switched calls to free fetch/decode functions and updated prepare_erc20_tokens_prefix signature to accept &RpcClient.
CLI & storage changes
crates/cli/src/commands/local_db/sync/cli.rs, crates/cli/src/commands/local_db/sync/storage.rs
Updated sync CLI to construct/use RpcClient instead of LocalDb; build_local_db_from_network now returns (RpcClient, Vec<Url>); tests adjusted.
LocalDb surface & errors
crates/common/src/local_db/mod.rs
Removed LocalDb struct, introduced is_chain_supported_local_db(chain_id: u32) -> bool, and changed LocalDbError variants to wrap DecodeError/InsertError via From conversions.
raindex_client: wasm/exported functions moved to free funcs
crates/common/src/raindex_client/local_db/*
Moved several wasm-exported methods from impl LocalDb to top-level exported free functions (e.g., get_sync_status, clear_tables_wasm), adjusted imports and error mapping.
raindex_client usage updates
crates/common/src/raindex_client/orders.rs, trades.rs, vaults.rs
Replaced LocalDb::check_support references with is_chain_supported_local_db and adjusted imports.
RpcClient test helper
crates/common/src/rpc_client.rs
Added pub(crate) fn mock() test-only constructor for RpcClient.
Webapp bindings
packages/webapp/src/lib/services/startLocalDbSync.ts, packages/webapp/src/routes/db-playground/+page.svelte
Replaced LocalDb client usage with public functions getSyncStatus(queryFn) and clearTables(queryFn); tests updated to mock new functions.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant SyncRunner
  participant EventsPipeline
  participant RpcClient
  participant RPC as "Remote RPC"
  rect rgba(120,200,255,0.08)
    SyncRunner->>EventsPipeline: request latest_block / fetch events
    EventsPipeline->>RpcClient: get_latest_block / collect_logs(...)
    RpcClient->>RPC: HTTP/RPC request(s)
    RPC-->>RpcClient: responses (LogEntryResponse / block number)
    RpcClient-->>EventsPipeline: aggregated LogEntryResponse
    EventsPipeline->>EventsPipeline: decode_events(...)
    EventsPipeline-->>SyncRunner: DecodedEventData / latest block
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Areas needing extra attention:

  • fetch.rs — correctness of moved logic (filter building, retry behavior, timestamp backfill).
  • Error conversions in local_db/mod.rs — ensure From conversions preserve original error contexts.
  • wasm/raindex_client free functions — ensure JS bindings and callback executor usage remain correct.
  • CLI/web changes — verify runtime wiring for rpc_urls and RpcClient constructors.
  • Tests that were adapted to RpcClient — ensure test isolation and mocks (RpcClient::mock) are sufficient.

Possibly related issues

Possibly related PRs

Suggested reviewers

  • hardyjosh
  • 0xgleb

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The pull request title 'Add EventPipeline logic' is vague and generic. While it references 'EventPipeline,' which does appear in the changeset (a new DefaultEventsPipeline struct is added), the title does not convey the specific nature or scope of the change. The changeset involves substantial refactoring beyond just adding EventPipeline logic—it includes converting LocalDb methods to RpcClient-based free functions, updating multiple integration points across the codebase, and removing public APIs. The title does not capture these broader changes or clarify what 'EventPipeline logic' entails. Consider using a more descriptive title that better captures the primary refactoring goal. For example: 'Migrate LocalDb to RpcClient-based architecture with new EventsPipeline' or 'Refactor local DB sync to use RpcClient with EventsPipeline adapter' would more accurately reflect the scope and nature of the changes across multiple modules.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ 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 local-db-events-pipeline

Comment @coderabbitai help to get the list of available commands and usage tips.

@findolor
Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 24, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Comment on lines +118 to +121
transaction_hash: format!(
"0x{}",
"aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"
),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lol why not

Suggested change
transaction_hash: format!(
"0x{}",
"aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"
),
transaction_hash: "0xaabbccddeeff00112233445566778899aabbccddeeff00112233445566778899".to_string(),

transaction_index: "0x0".to_string(),
block_hash: format!(
"0x{}",
"bbccddeeff00112233445566778899aabbccddeeff00112233445566778899aa"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ditto

@findolor findolor requested a review from hardyjosh November 3, 2025 09:53
Base automatically changed from local-db-sync-traits to main November 3, 2025 11:05
Copy link
Copy Markdown
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

Caution

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

⚠️ Outside diff range comments (2)
packages/webapp/src/lib/services/startLocalDbSync.ts (1)

36-45: Reset sync metadata when no rows are returned

If getSyncStatus(queryFn) yields an empty value, we leave whatever was previously in dbSyncLastBlock/dbSyncLastSyncTime. After a table clear or a fresh DB, the UI will continue to show the last run’s block/time, which is misleading. Please reset those stores when the result set is empty so the UI reflects the absence of sync progress.

-			if (!statusResult.error && statusResult.value && statusResult.value.length > 0) {
+			if (!statusResult.error && statusResult.value && statusResult.value.length > 0) {
 				const latestStatus = statusResult.value[statusResult.value.length - 1];
 				dbSyncLastBlock.set(latestStatus.last_synced_block?.toString?.() ?? null);
 				const syncTime = latestStatus.updated_at ? new Date(latestStatus.updated_at) : new Date();
 				dbSyncLastSyncTime.set(syncTime);
 			} else if (statusResult.error) {
 				dbSyncStatus.set(
 					statusResult.error.readableMsg ?? statusResult.error.msg ?? 'Failed to fetch sync status'
 				);
+			} else {
+				dbSyncLastBlock.set(null);
+				dbSyncLastSyncTime.set(null);
 			}
crates/common/src/local_db/sync.rs (1)

70-113: Avoid invalid block ranges when already caught up

Once last_synced_block equals latest_block, start_block becomes latest_block + 1, so the next fetch_orderbook_events call passes from > to. collect_logs rightfully rejects that, and every subsequent interval will hit LocalDbError::FetchEventsFailed. Please short-circuit when start_block > latest_block (e.g., send a status update and skip the fetch + insert work) so steady-state syncs don’t fail.

     let start_block = if last_synced_block == 0 {
         orderbook_cfg.deployment_block
     } else {
         last_synced_block.saturating_add(1)
     };

     status.send("Fetching latest onchain events...".to_string())?;
+    if start_block > latest_block {
+        status.send("Already synced to the latest block; nothing to do.".to_string())?;
+        status.send("Database sync complete.".to_string())?;
+        return Ok(());
+    }
     let events = fetch_orderbook_events(
         &rpc_client,
         orderbook_cfg.address,
         start_block,
         latest_block,
         &FetchConfig::default(),
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d6222dc and 096292c.

📒 Files selected for processing (18)
  • crates/cli/src/commands/local_db/sync/cli.rs (1 hunks)
  • crates/cli/src/commands/local_db/sync/data_source.rs (5 hunks)
  • crates/cli/src/commands/local_db/sync/storage.rs (4 hunks)
  • crates/common/src/local_db/fetch.rs (14 hunks)
  • crates/common/src/local_db/mod.rs (4 hunks)
  • crates/common/src/local_db/pipeline/adapters/events.rs (1 hunks)
  • crates/common/src/local_db/pipeline/adapters/mod.rs (1 hunks)
  • crates/common/src/local_db/pipeline/mod.rs (2 hunks)
  • crates/common/src/local_db/sync.rs (12 hunks)
  • crates/common/src/raindex_client/local_db/mod.rs (1 hunks)
  • crates/common/src/raindex_client/local_db/query/clear_tables.rs (2 hunks)
  • crates/common/src/raindex_client/local_db/query/fetch_last_synced_block.rs (2 hunks)
  • crates/common/src/raindex_client/orders.rs (3 hunks)
  • crates/common/src/raindex_client/trades.rs (3 hunks)
  • crates/common/src/raindex_client/vaults.rs (4 hunks)
  • crates/common/src/rpc_client.rs (1 hunks)
  • packages/webapp/src/lib/services/startLocalDbSync.ts (9 hunks)
  • packages/webapp/src/routes/db-playground/+page.svelte (3 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
crates/*/{src,tests,benches,examples}/**/*.rs

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

Rust code must pass clippy with all warnings denied (cargo clippy --workspace --all-targets --all-features -D warnings)

Files:

  • crates/common/src/local_db/pipeline/mod.rs
  • crates/common/src/rpc_client.rs
  • crates/common/src/local_db/pipeline/adapters/mod.rs
  • crates/common/src/raindex_client/trades.rs
  • crates/common/src/raindex_client/local_db/query/clear_tables.rs
  • crates/common/src/raindex_client/orders.rs
  • crates/cli/src/commands/local_db/sync/storage.rs
  • crates/cli/src/commands/local_db/sync/cli.rs
  • crates/common/src/raindex_client/vaults.rs
  • crates/common/src/local_db/mod.rs
  • crates/common/src/raindex_client/local_db/query/fetch_last_synced_block.rs
  • crates/cli/src/commands/local_db/sync/data_source.rs
  • crates/common/src/raindex_client/local_db/mod.rs
  • crates/common/src/local_db/sync.rs
  • crates/common/src/local_db/pipeline/adapters/events.rs
  • crates/common/src/local_db/fetch.rs
crates/**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

Rust code lives in the workspace under crates/* (e.g., cli, common, bindings, js_api, quote, subgraph, settings, math, integration_tests)

Files:

  • crates/common/src/local_db/pipeline/mod.rs
  • crates/common/src/rpc_client.rs
  • crates/common/src/local_db/pipeline/adapters/mod.rs
  • crates/common/src/raindex_client/trades.rs
  • crates/common/src/raindex_client/local_db/query/clear_tables.rs
  • crates/common/src/raindex_client/orders.rs
  • crates/cli/src/commands/local_db/sync/storage.rs
  • crates/cli/src/commands/local_db/sync/cli.rs
  • crates/common/src/raindex_client/vaults.rs
  • crates/common/src/local_db/mod.rs
  • crates/common/src/raindex_client/local_db/query/fetch_last_synced_block.rs
  • crates/cli/src/commands/local_db/sync/data_source.rs
  • crates/common/src/raindex_client/local_db/mod.rs
  • crates/common/src/local_db/sync.rs
  • crates/common/src/local_db/pipeline/adapters/events.rs
  • crates/common/src/local_db/fetch.rs
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.rs: Format Rust with nix develop -c cargo fmt --all
Lint Rust with nix develop -c rainix-rs-static (preconfigured flags)
Use snake_case for Rust crates/modules and PascalCase for types

Files:

  • crates/common/src/local_db/pipeline/mod.rs
  • crates/common/src/rpc_client.rs
  • crates/common/src/local_db/pipeline/adapters/mod.rs
  • crates/common/src/raindex_client/trades.rs
  • crates/common/src/raindex_client/local_db/query/clear_tables.rs
  • crates/common/src/raindex_client/orders.rs
  • crates/cli/src/commands/local_db/sync/storage.rs
  • crates/cli/src/commands/local_db/sync/cli.rs
  • crates/common/src/raindex_client/vaults.rs
  • crates/common/src/local_db/mod.rs
  • crates/common/src/raindex_client/local_db/query/fetch_last_synced_block.rs
  • crates/cli/src/commands/local_db/sync/data_source.rs
  • crates/common/src/raindex_client/local_db/mod.rs
  • crates/common/src/local_db/sync.rs
  • crates/common/src/local_db/pipeline/adapters/events.rs
  • crates/common/src/local_db/fetch.rs
packages/webapp/**/*.{svelte,ts}

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

Webapp must pass Svelte lint/format checks (npm run svelte-lint-format-check -w @rainlanguage/webapp)

Files:

  • packages/webapp/src/routes/db-playground/+page.svelte
  • packages/webapp/src/lib/services/startLocalDbSync.ts
packages/{webapp,ui-components}/**/*.{svelte,ts}

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

If you modify frontend code, you must include a screenshot of the built webapp reflecting the change

Files:

  • packages/webapp/src/routes/db-playground/+page.svelte
  • packages/webapp/src/lib/services/startLocalDbSync.ts
packages/**

📄 CodeRabbit inference engine (AGENTS.md)

JavaScript/Svelte projects live under packages/* (webapp, ui-components, orderbook)

Files:

  • packages/webapp/src/routes/db-playground/+page.svelte
  • packages/webapp/src/lib/services/startLocalDbSync.ts
🧠 Learnings (53)
📓 Common learnings
Learnt from: rouzwelt
Repo: rainlanguage/rain.orderbook PR: 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
Repo: rainlanguage/rain.orderbook PR: 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
Repo: rainlanguage/rain.orderbook PR: 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
Repo: rainlanguage/rain.orderbook PR: 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: findolor
Repo: rainlanguage/rain.orderbook PR: 2123
File: crates/common/src/raindex_client/local_db/mod.rs:23-29
Timestamp: 2025-10-06T11:13:29.956Z
Learning: In `crates/common/src/raindex_client/local_db/mod.rs`, the `Default` implementation for `LocalDb` that creates an RPC client pointing to `http://localhost:4444` is acceptable because the RPC client must be explicitly configured before actual usage in production scenarios.
📚 Learning: 2025-10-18T10:38:41.273Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2237
File: crates/common/src/raindex_client/local_db/sync.rs:79-89
Timestamp: 2025-10-18T10:38:41.273Z
Learning: In `crates/common/src/raindex_client/local_db/sync.rs`, the sync_database method currently only supports indexing a single orderbook per chain ID, which is why `.first()` is used to select the orderbook configuration. Multi-orderbook support per chain ID is planned for future PRs.

Applied to files:

  • crates/common/src/local_db/pipeline/mod.rs
  • crates/common/src/raindex_client/trades.rs
  • packages/webapp/src/routes/db-playground/+page.svelte
  • crates/common/src/raindex_client/orders.rs
  • crates/cli/src/commands/local_db/sync/storage.rs
  • crates/cli/src/commands/local_db/sync/cli.rs
  • crates/common/src/raindex_client/vaults.rs
  • crates/common/src/local_db/mod.rs
  • crates/common/src/raindex_client/local_db/query/fetch_last_synced_block.rs
  • crates/cli/src/commands/local_db/sync/data_source.rs
  • crates/common/src/raindex_client/local_db/mod.rs
  • crates/common/src/local_db/sync.rs
  • crates/common/src/local_db/fetch.rs
  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-10-14T07:51:55.148Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2202
File: crates/common/src/raindex_client/local_db/sync.rs:33-34
Timestamp: 2025-10-14T07:51:55.148Z
Learning: In `crates/common/src/raindex_client/local_db/sync.rs`, the hard-coded `DEFAULT_SYNC_CHAIN_ID` constant (set to `SUPPORTED_LOCAL_DB_CHAINS[0]`) will be replaced with proper chain ID handling in downstream PRs as part of the multi-network/orderbook implementation.

Applied to files:

  • crates/common/src/local_db/pipeline/mod.rs
  • crates/common/src/raindex_client/trades.rs
  • packages/webapp/src/routes/db-playground/+page.svelte
  • crates/common/src/raindex_client/orders.rs
  • crates/cli/src/commands/local_db/sync/storage.rs
  • crates/cli/src/commands/local_db/sync/cli.rs
  • crates/common/src/raindex_client/vaults.rs
  • crates/common/src/local_db/mod.rs
  • crates/common/src/raindex_client/local_db/query/fetch_last_synced_block.rs
  • crates/cli/src/commands/local_db/sync/data_source.rs
  • crates/common/src/raindex_client/local_db/mod.rs
  • crates/common/src/local_db/sync.rs
  • crates/common/src/local_db/pipeline/adapters/events.rs
  • crates/common/src/local_db/fetch.rs
  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-10-06T11:13:29.956Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2123
File: crates/common/src/raindex_client/local_db/mod.rs:23-29
Timestamp: 2025-10-06T11:13:29.956Z
Learning: In `crates/common/src/raindex_client/local_db/mod.rs`, the `Default` implementation for `LocalDb` that creates an RPC client pointing to `http://localhost:4444` is acceptable because the RPC client must be explicitly configured before actual usage in production scenarios.

Applied to files:

  • crates/common/src/local_db/pipeline/mod.rs
  • crates/common/src/rpc_client.rs
  • crates/common/src/raindex_client/trades.rs
  • crates/common/src/raindex_client/orders.rs
  • crates/cli/src/commands/local_db/sync/storage.rs
  • crates/cli/src/commands/local_db/sync/cli.rs
  • crates/common/src/raindex_client/vaults.rs
  • crates/common/src/local_db/mod.rs
  • crates/cli/src/commands/local_db/sync/data_source.rs
  • crates/common/src/raindex_client/local_db/mod.rs
  • crates/common/src/local_db/sync.rs
  • crates/common/src/local_db/pipeline/adapters/events.rs
  • crates/common/src/local_db/fetch.rs
  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-10-06T14:41:41.909Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2159
File: crates/cli/src/commands/local_db/sync/runner/mod.rs:52-113
Timestamp: 2025-10-06T14:41:41.909Z
Learning: The local DB sync CLI command (crates/cli/src/commands/local_db/sync/) is designed for CI-only usage, and simple println! statements are preferred over structured logging for status messages.

Applied to files:

  • crates/common/src/local_db/pipeline/mod.rs
  • crates/common/src/raindex_client/trades.rs
  • packages/webapp/src/routes/db-playground/+page.svelte
  • crates/cli/src/commands/local_db/sync/storage.rs
  • crates/cli/src/commands/local_db/sync/cli.rs
  • crates/common/src/raindex_client/vaults.rs
  • crates/common/src/local_db/mod.rs
  • crates/common/src/raindex_client/local_db/query/fetch_last_synced_block.rs
  • crates/cli/src/commands/local_db/sync/data_source.rs
  • crates/common/src/local_db/sync.rs
  • crates/common/src/local_db/fetch.rs
  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-10-06T11:28:30.692Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2145
File: crates/common/src/raindex_client/local_db/query/fetch_orders/query.sql:6-7
Timestamp: 2025-10-06T11:28:30.692Z
Learning: In `crates/common/src/raindex_client/local_db/query/fetch_orders/query.sql`, the orderbook_address is currently hardcoded to '0x2f209e5b67A33B8fE96E28f24628dF6Da301c8eB' because the system only supports a single orderbook at the moment. Multiorderbook logic is not yet implemented and will be added in the future.

Applied to files:

  • crates/common/src/local_db/pipeline/mod.rs
  • packages/webapp/src/routes/db-playground/+page.svelte
  • crates/common/src/raindex_client/orders.rs
  • crates/cli/src/commands/local_db/sync/data_source.rs
  • crates/common/src/local_db/sync.rs
  • crates/common/src/local_db/fetch.rs
📚 Learning: 2025-06-17T16:28:19.664Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1903
File: tauri-app/src/routes/orders/[network]-[orderHash]/page.test.ts:68-69
Timestamp: 2025-06-17T16:28:19.664Z
Learning: In the tauri-app test files, the team is comfortable using single URLs in rpcs arrays for test mocks rather than multiple URLs, even when testing multi-RPC functionality. They don't consider this a coverage gap that needs to be addressed.

Applied to files:

  • crates/common/src/rpc_client.rs
📚 Learning: 2025-10-06T14:13:18.531Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2155
File: crates/common/src/raindex_client/trades.rs:133-152
Timestamp: 2025-10-06T14:13:18.531Z
Learning: In the rain.orderbook codebase, the `page` parameter in `RaindexOrder::get_trades_list` method (in crates/common/src/raindex_client/trades.rs) is kept for backwards compatibility with subgraph logic, but the LocalDb fast-path intentionally returns all trades without implementing pagination.

Applied to files:

  • crates/common/src/raindex_client/trades.rs
  • packages/webapp/src/routes/db-playground/+page.svelte
  • crates/common/src/raindex_client/orders.rs
  • crates/common/src/raindex_client/vaults.rs
  • crates/cli/src/commands/local_db/sync/data_source.rs
  • crates/common/src/local_db/fetch.rs
  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-10-06T11:44:07.888Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2145
File: crates/common/src/raindex_client/local_db/query/create_tables/query.sql:71-72
Timestamp: 2025-10-06T11:44:07.888Z
Learning: The local DB feature in the rain.orderbook codebase is not live yet (as of PR #2145), so schema migrations for existing databases are not required when modifying table structures in `crates/common/src/raindex_client/local_db/query/create_tables/query.sql`.

Applied to files:

  • crates/common/src/raindex_client/trades.rs
  • packages/webapp/src/routes/db-playground/+page.svelte
  • crates/common/src/raindex_client/local_db/query/clear_tables.rs
  • crates/common/src/raindex_client/orders.rs
  • crates/cli/src/commands/local_db/sync/storage.rs
  • crates/common/src/raindex_client/vaults.rs
  • crates/cli/src/commands/local_db/sync/data_source.rs
  • crates/common/src/raindex_client/local_db/mod.rs
  • crates/common/src/local_db/sync.rs
  • crates/common/src/local_db/fetch.rs
  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-07-04T10:24:56.163Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1956
File: crates/common/src/raindex_client/trades.rs:215-223
Timestamp: 2025-07-04T10:24:56.163Z
Learning: In the rain.orderbook codebase, the get_trade_count method implementation that fetches all trades to count them is intentionally consistent with previous implementations and not considered a performance issue, as indicated by findolor for the trades counting functionality in crates/common/src/raindex_client/trades.rs.

Applied to files:

  • crates/common/src/raindex_client/trades.rs
📚 Learning: 2025-10-02T19:17:20.332Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2163
File: crates/common/src/raindex_client/orders.rs:738-741
Timestamp: 2025-10-02T19:17:20.332Z
Learning: In crates/common/src/raindex_client/orders.rs, fetch_dotrain_source() is intentionally called in try_from_sg_order for every order conversion because the dotrain source information is needed immediately. A future optimization with local DB logic is planned to eliminate the network round-trip concern.

Applied to files:

  • crates/common/src/raindex_client/trades.rs
  • crates/common/src/raindex_client/orders.rs
  • crates/cli/src/commands/local_db/sync/data_source.rs
  • crates/common/src/local_db/fetch.rs
📚 Learning: 2025-07-21T16:34:31.193Z
Learnt from: 0xgleb
Repo: rainlanguage/rain.orderbook PR: 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/trades.rs
📚 Learning: 2025-07-16T10:40:05.717Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 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/trades.rs
  • crates/common/src/raindex_client/orders.rs
  • crates/common/src/raindex_client/vaults.rs
  • crates/cli/src/commands/local_db/sync/data_source.rs
📚 Learning: 2025-10-06T14:12:05.824Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2155
File: crates/common/src/raindex_client/local_db/query/fetch_order_trades/query.sql:86-108
Timestamp: 2025-10-06T14:12:05.824Z
Learning: CTEs (Common Table Expressions) are not supported in the local DB SQL implementation used in the rain.orderbook codebase.

Applied to files:

  • crates/common/src/raindex_client/trades.rs
📚 Learning: 2025-10-06T10:23:57.479Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2111
File: packages/webapp/src/routes/db-playground/+page.svelte:149-153
Timestamp: 2025-10-06T10:23:57.479Z
Learning: The db-playground page at packages/webapp/src/routes/db-playground/+page.svelte is used for testing purposes, and production-level concerns (such as invalid RPC tokens) are acceptable in this context.

Applied to files:

  • packages/webapp/src/routes/db-playground/+page.svelte
📚 Learning: 2025-10-29T13:29:29.578Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2278
File: packages/webapp/src/lib/services/startLocalDbSync.ts:23-29
Timestamp: 2025-10-29T13:29:29.578Z
Learning: In packages/webapp/src/lib/services/startLocalDbSync.ts, the hard-coded default orderbook address '0x2f209e5b67A33B8fE96E28f24628dF6Da301c8eB' is a temporary placeholder that will be removed when new sync logic is introduced in the Raindex client, as documented in the NOTE comment.

Applied to files:

  • packages/webapp/src/routes/db-playground/+page.svelte
  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-03-31T10:16:53.544Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1469
File: packages/ui-components/src/__tests__/CodeMirrorDotrain.test.ts:75-98
Timestamp: 2025-03-31T10:16:53.544Z
Learning: In the rainlanguage/rain.orderbook project, direct manipulation of Svelte's internal state (component.$$.ctx) in tests is an acceptable approach for testing component behavior, as demonstrated in the CodeMirrorDotrain tests.

Applied to files:

  • packages/webapp/src/routes/db-playground/+page.svelte
📚 Learning: 2025-10-19T20:24:08.629Z
Learnt from: rouzwelt
Repo: rainlanguage/rain.orderbook PR: 2246
File: packages/webapp/src/hooks.client.ts:2-2
Timestamp: 2025-10-19T20:24:08.629Z
Learning: In the rain.orderbook repository, the import `rainlanguage/orderbook/esm` in packages/webapp/src/hooks.client.ts is intentional and should not be changed to the root package path, as it's specific to the webapp build configuration.

Applied to files:

  • packages/webapp/src/routes/db-playground/+page.svelte
  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-06-07T05:19:04.767Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1872
File: packages/webapp/src/lib/services/handleVaultWithdraw.ts:50-54
Timestamp: 2025-06-07T05:19:04.767Z
Learning: In the rainlanguage/rain.orderbook codebase, the team prefers pragmatic code approaches over strict TypeScript patterns when the current implementation is sufficient for their use case, such as using `if (result.error)` instead of `if ('error' in result)` for discriminated union type checking.

Applied to files:

  • packages/webapp/src/routes/db-playground/+page.svelte
  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-08-02T02:34:32.237Z
Learnt from: brusherru
Repo: rainlanguage/rain.orderbook PR: 2036
File: crates/js_api/src/filters/raindex_filter_store.rs:446-533
Timestamp: 2025-08-02T02:34:32.237Z
Learning: In the rainlanguage/rain.orderbook project's RaindexFilterStore WASM tests (crates/js_api/src/filters/raindex_filter_store.rs), brusherru decided to focus on testing only methods without side effects (that don't use web_sys) due to difficulties with mocking localStorage and window APIs in the WASM test environment. This pragmatic approach tests pure logic separately from browser integration.

Applied to files:

  • packages/webapp/src/routes/db-playground/+page.svelte
  • crates/common/src/raindex_client/local_db/query/clear_tables.rs
  • crates/common/src/raindex_client/local_db/mod.rs
  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-08-01T07:44:53.910Z
Learnt from: brusherru
Repo: rainlanguage/rain.orderbook PR: 2036
File: crates/js_api/src/filters/raindex_filter_store.rs:319-336
Timestamp: 2025-08-01T07:44:53.910Z
Learning: In the rainlanguage/rain.orderbook project's RaindexFilterStore (crates/js_api/src/filters/raindex_filter_store.rs), the team chose a simplified monolithic approach with hard-coded keys and default auto-save behavior over configurable stores. The update_vaults method intentionally auto-saves to both localStorage and URL after each update as the default behavior, following a design evolution from a previous configurable approach.

Applied to files:

  • packages/webapp/src/routes/db-playground/+page.svelte
  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-07-31T19:34:11.716Z
Learnt from: brusherru
Repo: rainlanguage/rain.orderbook PR: 2044
File: crates/common/src/raindex_client/vaults_list.rs:363-423
Timestamp: 2025-07-31T19:34:11.716Z
Learning: In the rainlanguage/rain.orderbook project, for WASM-exposed functionality like VaultsList, the team prefers to keep comprehensive tests in the non-WASM environment due to the complexity of recreating objects like RaindexVaults in WASM. WASM tests focus on basic functionality and error cases since the WASM code reuses the already-tested non-WASM implementation.

Applied to files:

  • packages/webapp/src/routes/db-playground/+page.svelte
  • crates/common/src/raindex_client/local_db/mod.rs
  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-10-21T05:15:50.518Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2256
File: crates/common/src/raindex_client/local_db/query/fetch_tables.rs:7-7
Timestamp: 2025-10-21T05:15:50.518Z
Learning: In Rust 2021+ editions, passing a reference to a temporary into an async function within the same expression (e.g., `exec.query_json(&fetch_tables_stmt()).await`) is safe and idiomatic. The temporary lifetime is extended across the await point, so this pattern should not be flagged as an issue.

Applied to files:

  • crates/common/src/raindex_client/local_db/query/clear_tables.rs
📚 Learning: 2025-08-01T09:07:20.383Z
Learnt from: brusherru
Repo: rainlanguage/rain.orderbook PR: 2044
File: packages/orderbook/README.md:186-189
Timestamp: 2025-08-01T09:07:20.383Z
Learning: In the rainlanguage/rain.orderbook project, Rust methods on structs like RaindexVaultsList are exported as JavaScript getters in WASM bindings using #[wasm_bindgen(getter)]. This means while the Rust code uses method calls like items(), the JavaScript/WASM API exposes them as property access like .items. The README.md correctly documents the JavaScript API surface, not the Rust implementation details.

Applied to files:

  • crates/common/src/raindex_client/local_db/query/clear_tables.rs
  • crates/common/src/raindex_client/local_db/query/fetch_last_synced_block.rs
  • crates/common/src/raindex_client/local_db/mod.rs
📚 Learning: 2025-07-04T09:02:57.301Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 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:

  • crates/common/src/raindex_client/orders.rs
📚 Learning: 2025-06-24T08:46:03.368Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1947
File: crates/common/src/raindex_client/orders.rs:98-125
Timestamp: 2025-06-24T08:46:03.368Z
Learning: In the vault merging logic in crates/common/src/raindex_client/orders.rs, optimization isn't necessary because the maximum list items are usually around 5 items. For such small datasets, the simple three-loop approach is preferred over HashMap-based optimization due to clarity and minimal performance impact.

Applied to files:

  • crates/common/src/raindex_client/orders.rs
📚 Learning: 2025-10-06T14:39:36.425Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2159
File: crates/cli/src/commands/local_db/sync/cli.rs:37-78
Timestamp: 2025-10-06T14:39:36.425Z
Learning: In the SyncLocalDb CLI command (crates/cli/src/commands/local_db/sync/cli.rs), block range validation (e.g., start_block <= end_block) is handled internally by the sync runner, not at the CLI entry point.

Applied to files:

  • crates/cli/src/commands/local_db/sync/storage.rs
  • crates/cli/src/commands/local_db/sync/cli.rs
  • crates/common/src/raindex_client/local_db/query/fetch_last_synced_block.rs
  • crates/cli/src/commands/local_db/sync/data_source.rs
  • crates/common/src/local_db/sync.rs
  • crates/common/src/local_db/fetch.rs
📚 Learning: 2025-06-17T16:32:04.554Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1903
File: crates/js_api/src/gui/order_operations.rs:124-134
Timestamp: 2025-06-17T16:32:04.554Z
Learning: In the rain.orderbook codebase, RPC lists are typically small (2 items maximum), so performance optimizations around cloning and converting small Vec<Url> collections are generally unnecessary.

Applied to files:

  • crates/cli/src/commands/local_db/sync/storage.rs
  • crates/cli/src/commands/local_db/sync/data_source.rs
  • crates/common/src/local_db/fetch.rs
📚 Learning: 2025-08-26T14:52:37.000Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2099
File: crates/common/src/hyper_rpc.rs:3-7
Timestamp: 2025-08-26T14:52:37.000Z
Learning: In the rain.orderbook codebase, creating new reqwest::Client instances per request in HyperRpcClient is not considered an issue by the maintainers, despite potential performance benefits of client reuse.

Applied to files:

  • crates/cli/src/commands/local_db/sync/storage.rs
  • crates/cli/src/commands/local_db/sync/data_source.rs
  • crates/common/src/raindex_client/local_db/mod.rs
  • crates/common/src/local_db/fetch.rs
📚 Learning: 2025-10-13T12:57:05.900Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2198
File: crates/common/src/raindex_client/local_db/query/fetch_store_addresses/mod.rs:7-8
Timestamp: 2025-10-13T12:57:05.900Z
Learning: In the rain.orderbook repository, using unqualified serde helper names (e.g., `#[serde(with = "serde_address")]`) that rely on glob imports is acceptable and does not need to be changed to fully qualified paths.

Applied to files:

  • crates/cli/src/commands/local_db/sync/storage.rs
  • crates/cli/src/commands/local_db/sync/data_source.rs
📚 Learning: 2025-04-07T09:51:52.614Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1483
File: crates/settings/src/remote_tokens.rs:32-57
Timestamp: 2025-04-07T09:51:52.614Z
Learning: The implementation for remote token fetching in `crates/settings/src/remote_tokens.rs` does not include explicit timeouts/retries, as the team considers the current implementation sufficient for now.

Applied to files:

  • crates/cli/src/commands/local_db/sync/storage.rs
📚 Learning: 2025-07-11T06:40:49.511Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1983
File: crates/js_api/src/gui/mod.rs:964-1199
Timestamp: 2025-07-11T06:40:49.511Z
Learning: In crates/js_api/src/gui/mod.rs tests, findolor prefers to keep large hardcoded YAML strings (like the validation test YAML) inline in the test file rather than extracting them to separate external files for maintainability purposes.

Applied to files:

  • crates/cli/src/commands/local_db/sync/storage.rs
📚 Learning: 2025-05-16T17:24:34.724Z
Learnt from: 0xgleb
Repo: rainlanguage/rain.orderbook PR: 1844
File: tauri-app/src-tauri/src/commands/wallet.rs:27-28
Timestamp: 2025-05-16T17:24:34.724Z
Learning: In Rust projects, dependencies listed in the [dependencies] section of Cargo.toml are available for both application code and tests. The tokio crate with the "full" feature set includes the "test" feature needed for `#[tokio::test]` to work properly.

Applied to files:

  • crates/cli/src/commands/local_db/sync/storage.rs
📚 Learning: 2025-07-11T06:41:11.924Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1983
File: crates/js_api/src/gui/deposits.rs:147-156
Timestamp: 2025-07-11T06:41:11.924Z
Learning: In the Rain OrderBook project, token info is already cached in the YAML file which serves as the source of truth, so the `get_token_info()` async method in the GUI SDK retrieves from pre-loaded/parsed data rather than making expensive network calls.

Applied to files:

  • crates/cli/src/commands/local_db/sync/data_source.rs
📚 Learning: 2025-05-20T10:20:08.206Z
Learnt from: 0xgleb
Repo: rainlanguage/rain.orderbook PR: 1859
File: crates/quote/src/quote_debug.rs:472-492
Timestamp: 2025-05-20T10:20:08.206Z
Learning: In the Rain Orderbook codebase, the `#[tokio::test(flavor = "multi_thread")]` annotation is specifically needed for tests that use `LocalEvm`, not just for consistency across all async tests.

Applied to files:

  • crates/cli/src/commands/local_db/sync/data_source.rs
  • crates/common/src/local_db/sync.rs
  • crates/common/src/local_db/pipeline/adapters/events.rs
📚 Learning: 2025-05-14T05:51:50.277Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1715
File: crates/js_api/src/common/mod.rs:55-59
Timestamp: 2025-05-14T05:51:50.277Z
Learning: In the Rain Orderbook project, the error handling for WASM exported functions uses WasmEncodedError which includes both the original error message and a human-readable version, making direct modification of the JsValue conversion unnecessary.

Applied to files:

  • crates/common/src/raindex_client/local_db/mod.rs
📚 Learning: 2025-05-19T13:40:56.080Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1858
File: crates/subgraph/src/orderbook_client/mod.rs:54-58
Timestamp: 2025-05-19T13:40:56.080Z
Learning: The `wasm_bindgen_utils` crate in the Rain Orderbook project handles conditional compilation for `JsValue` and `JsError` internally, allowing `impl From<Error> for JsValue` to work on non-WASM targets without explicit cfg guards.

Applied to files:

  • crates/common/src/raindex_client/local_db/mod.rs
📚 Learning: 2025-05-14T04:49:14.621Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1710
File: crates/quote/Cargo.toml:30-30
Timestamp: 2025-05-14T04:49:14.621Z
Learning: In the rain.orderbook repository, wasm-bindgen-utils is intentionally used as an unconditional dependency because non-wasm targets (like tests) sometimes need to use it.

Applied to files:

  • crates/common/src/raindex_client/local_db/mod.rs
📚 Learning: 2025-06-24T13:36:28.797Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1950
File: crates/common/src/raindex_client/orders.rs:301-301
Timestamp: 2025-06-24T13:36:28.797Z
Learning: In the RaindexClient codebase, when Arc::new(RwLock::new(self.clone())) is used (e.g., in get_orders and get_order_by_hash methods), this creates new Arc/RwLock wrappers around a cloned RaindexClient, but the underlying client data is functionally the same. This pattern is used to provide the correct Arc<RwLock<RaindexClient>> type expected by RaindexOrder::try_from_sg_order() method.

Applied to files:

  • crates/common/src/raindex_client/local_db/mod.rs
📚 Learning: 2025-06-20T07:51:08.790Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 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/local_db/mod.rs
📚 Learning: 2025-06-17T16:21:24.384Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1903
File: crates/settings/src/yaml/orderbook.rs:371-377
Timestamp: 2025-06-17T16:21:24.384Z
Learning: In crates/settings/src/yaml/orderbook.rs tests, the user findolor considers RPC ordering in Vec<Url> assertions to be intentional and not a test brittleness issue. The ordering of RPCs in tests should be preserved as specified.

Applied to files:

  • crates/common/src/local_db/pipeline/adapters/events.rs
  • crates/common/src/local_db/fetch.rs
📚 Learning: 2025-06-18T18:24:32.049Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1938
File: crates/settings/src/yaml/orderbook.rs:180-199
Timestamp: 2025-06-18T18:24:32.049Z
Learning: In crates/settings/src/yaml/orderbook.rs, the user prefers to avoid refactoring duplicate search logic between get_orderbook_by_address and get_orderbook_by_network_key when there are only 2 functions, indicating they would consider it if more similar functions are added in the future.

Applied to files:

  • crates/common/src/local_db/fetch.rs
📚 Learning: 2025-06-30T14:17:16.626Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1926
File: packages/ui-components/src/lib/__mocks__/stores.ts:13-17
Timestamp: 2025-06-30T14:17:16.626Z
Learning: User findolor reports that vi.mock(import('rainlanguage/orderbook'), async (importOriginal) => { ... }) syntax works in their testing environment, despite official Vitest documentation indicating the first argument should be a string. This suggests there may be specific Vitest versions or configurations that support dynamic import() as the first argument to vi.mock().

Applied to files:

  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-09-02T08:04:44.814Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2117
File: packages/ui-components/src/__tests__/VaultIdInformation.test.ts:9-13
Timestamp: 2025-09-02T08:04:44.814Z
Learning: In packages/ui-components/src/__tests__/VaultIdInformation.test.ts and similar test files in the rain.orderbook project, the passthrough vi.mock('rainlanguage/orderbook', async (importOriginal) => { return { ...(await importOriginal()) }; }); block is required for tests to run properly, even when not overriding any exports. This is needed due to the specific Vitest configuration or test environment setup in the project.

Applied to files:

  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-06-17T14:55:22.914Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1936
File: packages/ui-components/vite.config.ts:21-23
Timestamp: 2025-06-17T14:55:22.914Z
Learning: In the rain.orderbook project, the Vite configuration uses `'import.meta.vitest': 'undefined'` (as a string) combined with conditional `if (import.meta.vitest)` checks for in-source testing. The mock files are excluded from test execution using `exclude: ['src/lib/__mocks__/**/*.ts']`. This configuration successfully allows dev builds to work without `vi` undefined errors, despite the theoretical expectation that the string "undefined" would be truthy and cause issues.

Applied to files:

  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-08-14T18:29:32.933Z
Learnt from: brusherru
Repo: rainlanguage/rain.orderbook PR: 2083
File: packages/ui-components/src/__tests__/VaultsListTable.test.ts:16-19
Timestamp: 2025-08-14T18:29:32.933Z
Learning: In the rain.orderbook project's UI components tests, mocking hooks like useToasts is often required as infrastructure even when not directly asserting on their calls, because components internally depend on these hooks. Removing such mocks would break component rendering in tests and require more complex test setup with providers.

Applied to files:

  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-06-08T18:43:51.842Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1891
File: packages/webapp/src/routes/deploy/[strategyName]/[deploymentKey]/page.test.ts:66-80
Timestamp: 2025-06-08T18:43:51.842Z
Learning: In the rain.orderbook webapp test files, when mocking objects like the transaction manager, it's acceptable to use simple empty objects with ts-expect-error comments rather than providing complete mock implementations with all properties and methods.

Applied to files:

  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-04-04T11:25:21.518Z
Learnt from: hardingjam
Repo: rainlanguage/rain.orderbook PR: 1559
File: packages/ui-components/src/__tests__/OrderOrVaultHash.test.ts:94-94
Timestamp: 2025-04-04T11:25:21.518Z
Learning: In the rain.orderbook project, minimal test fixtures are preferred over complete mocks that implement the entire interface. Type casting (e.g., `as unknown as SgVault`) is an acceptable approach to maintain both minimal fixtures and TypeScript type compatibility.

Applied to files:

  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-04-08T09:18:46.653Z
Learnt from: hardingjam
Repo: rainlanguage/rain.orderbook PR: 1597
File: packages/ui-components/src/__tests__/OrderDetail.test.ts:120-120
Timestamp: 2025-04-08T09:18:46.653Z
Learning: In test files for the Rain Orderbook project, it's acceptable to bypass TypeScript's strict typing using constructs like `as unknown as [Type]` to create simplified mock objects that don't need to implement the entire interface.

Applied to files:

  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-10-06T08:05:02.438Z
Learnt from: CR
Repo: rainlanguage/rain.orderbook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-06T08:05:02.438Z
Learning: Applies to packages/orderbook/**/*.{test,spec}.{ts,tsx} : Orderbook tests must pass (npm run test -w rainlanguage/orderbook)

Applied to files:

  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-07-04T09:14:35.748Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1956
File: packages/ui-components/src/__tests__/VaultDetail.test.ts:177-181
Timestamp: 2025-07-04T09:14:35.748Z
Learning: In the rain.orderbook project, maintainer findolor is fine with mutating mock data directly in test files using ts-expect-error comments, preferring this pragmatic approach over immutable patterns like spread operators for test data updates.

Applied to files:

  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-04-07T08:18:36.473Z
Learnt from: hardingjam
Repo: rainlanguage/rain.orderbook PR: 1565
File: packages/webapp/src/routes/deploy/layout.test.ts:12-29
Timestamp: 2025-04-07T08:18:36.473Z
Learning: In test files for this project, hardingjam prefers to use custom mocks (such as for localStorage) rather than relying on environment-provided implementations, as this allows for spying on individual methods and having precise control over implementation details for more robust testing.

Applied to files:

  • packages/webapp/src/lib/services/startLocalDbSync.ts
📚 Learning: 2025-07-09T12:35:45.699Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1974
File: packages/ui-components/src/__tests__/DeploymentSteps.test.ts:123-126
Timestamp: 2025-07-09T12:35:45.699Z
Learning: In packages/ui-components/src/__tests__/DeploymentSteps.test.ts, findolor prefers to keep mock initializations (like setSelectToken) in individual test cases rather than consolidating them into shared beforeEach blocks, even when it results in duplication.

Applied to files:

  • packages/webapp/src/lib/services/startLocalDbSync.ts
🧬 Code graph analysis (13)
crates/common/src/rpc_client.rs (1)
crates/bindings/src/provider.rs (1)
  • mk_read_provider (24-42)
crates/common/src/raindex_client/trades.rs (2)
crates/common/src/local_db/mod.rs (1)
  • is_chain_supported_local_db (187-189)
crates/common/src/raindex_client/local_db/query/fetch_order_trades.rs (1)
  • fetch_order_trades (6-15)
crates/common/src/raindex_client/local_db/query/clear_tables.rs (1)
crates/common/src/raindex_client/local_db/mod.rs (1)
  • from (10-15)
crates/common/src/raindex_client/orders.rs (1)
crates/common/src/local_db/mod.rs (1)
  • is_chain_supported_local_db (187-189)
crates/cli/src/commands/local_db/sync/storage.rs (2)
crates/common/src/rpc_client.rs (1)
  • new_with_hyper_rpc (103-111)
crates/cli/src/commands/local_db/sync/runner/mod.rs (1)
  • metadata_rpcs (163-169)
crates/cli/src/commands/local_db/sync/cli.rs (2)
crates/cli/src/commands/local_db/sync/storage.rs (1)
  • build_local_db_from_network (81-105)
crates/cli/src/commands/local_db/sync/runner/mod.rs (1)
  • new (45-57)
crates/common/src/raindex_client/vaults.rs (1)
crates/common/src/local_db/mod.rs (1)
  • is_chain_supported_local_db (187-189)
crates/common/src/local_db/mod.rs (4)
crates/common/src/local_db/pipeline/adapters/events.rs (1)
  • decode (72-77)
crates/common/src/local_db/pipeline/mod.rs (1)
  • decode (205-208)
crates/common/src/raindex_client/local_db/mod.rs (1)
  • from (10-15)
crates/common/src/raindex_client/mod.rs (6)
  • from (241-245)
  • from (323-325)
  • from (329-331)
  • from (335-337)
  • from (456-458)
  • from (462-467)
crates/cli/src/commands/local_db/sync/data_source.rs (4)
crates/common/src/local_db/fetch.rs (2)
  • fetch_orderbook_events (125-138)
  • fetch_store_events (140-153)
crates/common/src/local_db/insert.rs (3)
  • decoded_events_to_statements (95-154)
  • raw_events_to_statements (156-237)
  • raw_events (168-191)
crates/common/src/local_db/token_fetch.rs (1)
  • fetch_erc20_metadata_concurrent (16-57)
crates/common/src/rpc_client.rs (1)
  • rpc_urls (124-126)
crates/common/src/local_db/sync.rs (3)
crates/common/src/local_db/fetch.rs (3)
  • fetch_orderbook_events (125-138)
  • fetch_store_events (140-153)
  • new (42-71)
crates/common/src/local_db/insert.rs (1)
  • decoded_events_to_statements (95-154)
crates/common/src/rpc_client.rs (1)
  • new_with_urls (88-101)
crates/common/src/local_db/pipeline/adapters/events.rs (3)
crates/common/src/local_db/pipeline/mod.rs (4)
  • decode (205-208)
  • latest_block (183-183)
  • fetch_orderbook (186-192)
  • fetch_stores (195-201)
crates/common/src/local_db/fetch.rs (2)
  • fetch_orderbook_events (125-138)
  • fetch_store_events (140-153)
crates/common/src/rpc_client.rs (2)
  • new_with_urls (88-101)
  • new_with_hyper_rpc (103-111)
crates/common/src/local_db/fetch.rs (2)
crates/common/src/retry.rs (1)
  • retry_with_backoff (31-55)
crates/common/src/rpc_client.rs (2)
  • new_with_urls (88-101)
  • mock (168-176)
packages/webapp/src/lib/services/startLocalDbSync.ts (1)
packages/webapp/src/lib/stores/dbSync.ts (2)
  • dbSyncStatus (3-3)
  • dbSyncIsActive (6-6)
🔇 Additional comments (19)
crates/common/src/raindex_client/local_db/query/fetch_last_synced_block.rs (1)

14-27: LGTM! Clean refactoring to a standalone exported function.

The implementation correctly wraps the existing helper with WASM bindings, follows idiomatic error handling patterns, and maintains proper naming conventions for both Rust and JavaScript APIs.

crates/common/src/rpc_client.rs (1)

167-176: LGTM! Well-structured test utility.

The mock constructor is properly scoped with cfg(all(test, not(target_family = "wasm"))) and pub(crate) visibility, follows the same pattern as the existing update_rpc_urls test helper, and has no impact on production code paths.

crates/common/src/raindex_client/local_db/mod.rs (1)

1-16: LGTM! Clean refactoring toward RpcClient-based flows.

The removal of the wasm-exported get_local_db_client constructor and associated imports simplifies the module surface while properly retaining the error conversion implementation. This aligns well with the broader PR objective of migrating from LocalDb-centric to RpcClient-centric patterns.

crates/common/src/local_db/pipeline/adapters/mod.rs (1)

1-1: LGTM! Proper module organization.

Clean public exposure of the events submodule as part of the adapters surface area.

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

3-4: LGTM! Consistent migration to centralized chain support checks.

The replacement of LocalDb::check_support(chain_id) with is_chain_supported_local_db(chain_id) in both get_trades_list and get_trade_count centralizes chain support logic and eliminates direct LocalDb coupling. The free function approach is cleaner and aligns with the broader RpcClient-based refactoring across the PR.

Also applies to: 135-135, 247-247

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

3-3: LGTM! Consistent chain support check migration.

The replacement of LocalDb::check_support with is_chain_supported_local_db in both get_orders (partition logic) and get_order_by_hash (conditional branch) maintains consistency with the same refactoring pattern applied in trades.rs. This centralizes chain support validation and removes direct LocalDb dependencies.

Also applies to: 520-520, 699-699

crates/common/src/local_db/pipeline/mod.rs (1)

10-10: LGTM! Proper public API surface.

The addition of pub mod adapters; appropriately exposes the adapters module as the public entry point for pipeline-related functionality, including the new EventsPipeline implementations. Clean modular design that supports the RpcClient-based refactoring.

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

3-3: LGTM! Consistent migration to free function.

The replacement of LocalDb::check_support(chain_id) with is_chain_supported_local_db(chain_id) at all three call sites is consistent with the broader architectural shift away from LocalDb. The semantics remain identical—both check if the chain is in the supported list.

Also applies to: 310-310, 1105-1105, 1336-1336

crates/common/src/raindex_client/local_db/query/clear_tables.rs (1)

13-21: LGTM! Clean refactor to free function.

The conversion of clear_tables_wasm from a LocalDb method to a standalone free function maintains the same behavior while removing the LocalDb dependency. The function properly creates a JsCallbackExecutor and delegates to the existing clear_tables implementation with appropriate error mapping.

crates/cli/src/commands/local_db/sync/cli.rs (1)

65-68: LGTM! Type parameter updated consistently.

The change from local_db to rpc_client is a straightforward type parameter update that aligns with the broader migration from LocalDb to RpcClient. The call to SyncRunner::new correctly passes the new rpc_client reference.

packages/webapp/src/routes/db-playground/+page.svelte (1)

7-7: LGTM! Clean migration to public API.

The change from using a localDbClient instance to directly calling free functions (getSyncStatus(queryFn) and clearTables(queryFn)) is a clean refactor. The error handling pattern (result.error/result.value) remains unchanged, and the queryFn callback is consistently bound to db.value.query.

Also applies to: 134-134, 358-358

crates/cli/src/commands/local_db/sync/storage.rs (2)

81-104: LGTM! Function signature updated to return RpcClient.

The build_local_db_from_network function signature has been correctly updated to return (RpcClient, Vec<Url>) instead of (LocalDb, Vec<Url>). The construction uses RpcClient::new_with_hyper_rpc which properly initializes the client with the HyperRPC endpoint.


158-166: LGTM! Tests updated correctly.

The test correctly verifies the new return type by calling rpc_client.rpc_urls() and asserting on the HyperRPC URL structure. The test properly validates that metadata RPCs match the network configuration and that the event RPC URL is correctly constructed with the HyperRPC endpoint.

crates/cli/src/commands/local_db/sync/data_source.rs (1)

79-155: LGTM! Well-structured trait implementation for RpcClient.

The SyncDataSource trait implementation for RpcClient properly delegates to the new free functions:

  • latest_block() correctly maps errors through anyhow!
  • fetch_events() efficiently converts the orderbook address once before passing to fetch_orderbook_events
  • fetch_store_set_events() provides good error context when parsing each store address
  • All decode/SQL generation methods correctly delegate to the new free functions with proper error mapping

The refactor maintains all original functionality while removing the LocalDb dependency.

crates/common/src/local_db/mod.rs (2)

111-115: LGTM! Improved error handling with transparent error variants.

The refactoring of DecodeError and InsertError from struct-like variants with message fields to transparent variants using #[from] is a cleaner design. This enables automatic error conversions and preserves the full error context from the underlying error types.


187-189: LGTM! New public helper for chain support checks.

The new is_chain_supported_local_db function provides a clean public API for checking if a chain is supported by the local DB. This replaces the previous pattern of calling LocalDb::check_support and aligns with the migration away from LocalDb as a central type.

crates/common/src/local_db/pipeline/adapters/events.rs (3)

18-34: LGTM! Well-designed constructors for different use cases.

The DefaultEventsPipeline provides two clear construction paths:

  • with_regular_rpcs for browser/public RPCs
  • with_hyperrpc for the producer/HyperRPC path

Both properly handle errors by converting RpcClientError into LocalDbError through the ? operator and From conversion.


36-78: LGTM! Clean trait implementation with proper delegation.

The EventsPipeline trait implementation correctly delegates to the corresponding free functions:

  • latest_block() uses get_latest_block_number() with Into::into error mapping
  • fetch_orderbook() and fetch_stores() delegate to fetch_orderbook_events and fetch_store_events
  • decode() wraps the result with LocalDbError::DecodeError for proper error propagation

The use of #[async_trait(?Send)] is appropriate for the WASM target.


91-148: LGTM! Comprehensive test coverage.

The tests properly cover:

  • Successful construction via both with_regular_rpcs and with_hyperrpc
  • Decode error propagation when invalid log data is provided
  • Constructor error paths for empty RPC lists and unsupported chain IDs

The test assertions correctly match against specific error variants to ensure proper error handling.

Comment on lines +14 to 27
/// Returns the sync status rows from the local DB (via provided JS query callback)
#[wasm_export(
js_name = "getSyncStatus",
unchecked_return_type = "SyncStatusResponse[]"
)]
pub async fn get_sync_status(
#[wasm_export(param_description = "JavaScript function to execute database queries")]
db_callback: js_sys::Function,
) -> Result<Vec<SyncStatusResponse>, LocalDbError> {
let exec = crate::raindex_client::local_db::executor::JsCallbackExecutor::new(&db_callback);
fetch_last_synced_block(&exec)
.await
.map_err(LocalDbError::from)
}
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.

🧹 Nitpick | 🔵 Trivial

Consider adding test coverage for the exported function.

While the existing test validates the helper function, there's no test for the new get_sync_status wrapper, particularly the error mapping from LocalDbQueryError to LocalDbError. A simple test could verify the error conversion path works as expected.

🤖 Prompt for AI Agents
In crates/common/src/raindex_client/local_db/query/fetch_last_synced_block.rs
around lines 14 to 27, add a unit test that exercises the exported async wrapper
get_sync_status to ensure the LocalDbQueryError -> LocalDbError mapping works;
write a test that constructs a JsCallbackExecutor (or supply a js_sys::Function
stub) that causes fetch_last_synced_block to fail with a LocalDbQueryError, call
get_sync_status().await and assert it returns
Err(LocalDbError::from(the_query_error)) (or matches the expected LocalDbError
variant/message), and include any necessary wasm-bindgen test harness setup and
async test attribute so the exported wrapper error path is covered.

@findolor findolor merged commit 8e66283 into main Nov 4, 2025
19 checks passed
@findolor findolor deleted the local-db-events-pipeline branch November 4, 2025 07:07
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 4, 2025

@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
Copy Markdown
Contributor

coderabbitai Bot commented Nov 4, 2025

Tip

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

SIZE=L


🧠 Learnings used
Learnt from: rouzwelt
Repo: rainlanguage/rain.orderbook PR: 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
Repo: rainlanguage/rain.orderbook PR: 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
Repo: rainlanguage/rain.orderbook PR: 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
Repo: rainlanguage/rain.orderbook PR: 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
Repo: rainlanguage/rain.orderbook PR: 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
Repo: rainlanguage/rain.orderbook PR: 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
Repo: rainlanguage/rain.orderbook PR: 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
Repo: rainlanguage/rain.orderbook PR: 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
Repo: rainlanguage/rain.orderbook PR: 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
Repo: rainlanguage/rain.orderbook PR: 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: findolor
Repo: rainlanguage/rain.orderbook PR: 1971
File: .github/workflows/vercel-docs-prod.yaml:32-34
Timestamp: 2025-07-11T12:30:09.245Z
Learning: findolor prefers not to pin Node versions explicitly in GitHub Actions workflows when using Nix with webapp-shell, considering the current setup sufficient for deterministic builds in the rainlanguage/rain.orderbook project.

Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 1971
File: .github/workflows/vercel-docs-prod.yaml:10-14
Timestamp: 2025-07-11T12:29:49.284Z
Learning: In GitHub Actions workflows for the rainlanguage/rain.orderbook project, findolor is comfortable with job names that may seem misleading (like "Deploy-Docs-Preview" in a production workflow) when there's only one job in the workflow, as the context makes it clear enough.

Learnt from: rouzwelt
Repo: rainlanguage/rain.orderbook PR: 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.

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