Skip to content

Conversation

@anmolagrawal345
Copy link
Contributor

@anmolagrawal345 anmolagrawal345 commented Nov 5, 2025

Changelist

On the FE, we require more flexible querying for our orders/fills tables - specifically for the TWAP feature. This adds include/exclude type fields to the query endpoints to make it easy to configure which results we want.

For now, we can keep the original type parameter as is with an understanding that we could deprecate/migrate away from it.

Test Plan

[Describe how this PR was tested (if applicable)]

Author/Reviewer Checklist

  • If this PR has changes that result in a different app state given the same prior state and transaction list, manually add the state-breaking label.
  • If the PR has breaking postgres changes to the indexer add the indexer-postgres-breaking label.
  • If this PR isn't state-breaking but has changes that modify behavior in PrepareProposal or ProcessProposal, manually add the label proposal-breaking.
  • If this PR is one of many that implement a specific feature, manually label them all feature:[feature-name].
  • If you wish to for mergify-bot to automatically create a PR to backport your change to a release branch, manually add the label backport/[branch-name].
  • Manually add any of the following labels: refactor, chore, bug.

Summary by CodeRabbit

  • New Features

    • Added optional includeTypes and excludeTypes query parameters to fills and orders endpoints (including parent-subaccount variants).
  • Behavior

    • Server now applies these type filters across listing endpoints and merged cache/database results; filters are validated and enforced.
  • Documentation

    • API docs and Swagger updated with new parameters, allowed values, and examples.
  • Chores

    • Request parsing improved to accept either CSV strings or array inputs for type lists.

@anmolagrawal345 anmolagrawal345 requested a review from a team as a code owner November 5, 2025 18:07
@linear
Copy link

linear bot commented Nov 5, 2025

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 5, 2025

Walkthrough

This PR adds optional type-based filtering parameters (includeTypes, excludeTypes) for fills and orders across Postgres stores, query-type definitions, API controllers, request types, validation/sanitizers, Swagger/docs, and threads the new filters through request handling and DB queries.

Changes

Cohort / File(s) Summary
Postgres stores
indexer/packages/postgres/src/stores/fill-table.ts, indexer/packages/postgres/src/stores/order-table.ts
Add optional includeTypes and excludeTypes to findAll queries; apply whereIn / whereNotIn to type columns. Minor import/format tweaks.
Query types (Postgres)
indexer/packages/postgres/src/types/query-types.ts
Add INCLUDE_TYPES / EXCLUDE_TYPES to QueryableField; extend OrderQueryConfig and FillQueryConfig to accept type arrays; adjust type imports (FillType, Liquidity).
API controllers & request helpers
indexer/services/comlink/src/controllers/api/v4/fills-controller.ts, indexer/services/comlink/src/controllers/api/v4/orders-controller.ts, indexer/services/comlink/src/request-helpers/sanitizers.ts, indexer/services/comlink/src/request-helpers/*
Thread includeTypes/excludeTypes through controller signatures, route handlers, and downstream queries; add sanitization (sanitizeArray) and validation (validateArray) usage; update request parsing.
Public types
indexer/services/comlink/src/types.ts
Add optional `includeTypes?: FillType[]
API docs & spec
indexer/services/comlink/public/api-documentation.md, indexer/services/comlink/public/swagger.json
Add includeTypes and excludeTypes optional query parameters to fills/orders endpoints; document allowed enum values and update examples.
CI workflow
.github/workflows/indexer-build-and-push-dev-staging.yml
Add branch pattern anmol/twap-comlink to push triggers (CI trigger change only).

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Router
    participant Controller
    participant Validator
    participant Store
    participant Database

    Client->>Router: GET /fills?includeTypes=TWAP_SUBORDER&excludeTypes=DELEVERAGED
    Router->>Controller: parsed params (includeTypes, excludeTypes, ...)
    Controller->>Validator: sanitizeArray + validateArray(includeTypes/excludeTypes)
    Validator-->>Controller: validated arrays

    alt valid
        Controller->>Store: findAll({ ..., includeTypes, excludeTypes })
        Store->>Database: SELECT ... WHERE type IN (...) AND type NOT IN (...)
        Database-->>Store: rows
        Store-->>Controller: results
        Controller-->>Client: 200 JSON
    else invalid
        Controller-->>Client: 400 Validation Error
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Areas to focus on:
    • fill-table.ts and order-table.ts — correctness of whereIn / whereNotIn placement and interaction with existing filters (status/type branches).
    • Proper typing: FillType vs OrderType uses in query configs and controllers.
    • Sanitizer (sanitizeArray) behavior for string vs array inputs and validation error messages.
    • Swagger schemas and controller validation remain consistent.

Possibly related PRs

Suggested labels

indexer-postgres-improvement, twap

Suggested reviewers

  • shrenujb
  • tqin7
  • tyleroooo

Poem

🐰 I hopped through rows and query tracks,

added filters, skipping clumsy hacks.
Include a type, exclude another,
from docs to DB I bound them together.
A tiny hop — cleaner searches, clever.

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description provides a clear changelist explaining the feature (include/exclude type fields for flexible querying). However, the 'Test Plan' section is incomplete/unfilled, which is a required section in the template. Fill in the 'Test Plan' section describing how this PR was tested, or indicate if manual testing was performed and what scenarios were covered.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: adding setup for indexer endpoints to support TWAP orders/fills filtering.
✨ 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 anmol/twap-comlink

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (1)
indexer/services/comlink/src/controllers/api/v4/orders-controller.ts (1)

444-500: Parameter filters are ANDed together, causing conflicts when type, includeTypes, and excludeTypes are combined.

The database layer applies all three filters sequentially via AND logic (indexer/packages/postgres/src/stores/order-table.ts lines 154-164):

  • type produces WHERE type = ?
  • includeTypes produces WHERE type IN (?)
  • excludeTypes produces WHERE type NOT IN (?)

Specifying conflicting parameters (e.g., type=LIMIT + includeTypes=[MARKET]) creates an impossible condition that returns no results. Since the type definitions (indexer/services/comlink/src/types.ts lines 549-551) allow all three to be optional and simultaneously specified, there's no validation preventing this.

Recommend either:

  1. Add validation to reject conflicting parameter combinations, or
  2. Document that type is ignored if includeTypes/excludeTypes are provided, or
  3. Make these mutually exclusive at the schema level.
🧹 Nitpick comments (6)
indexer/packages/postgres/src/stores/fill-table.ts (2)

166-176: Define and enforce filter precedence to avoid accidental empty sets.

Currently the code applies:

  • where(type = X) when type is set
  • AND whereIn(type IN includeTypes) when provided
  • AND whereNotIn(type NOT IN excludeTypes) when provided

This silently intersects type with includeTypes. If a caller passes type=LIMIT and includeTypes=['TWAP_SUBORDER'], the result is empty. If intended, document it; otherwise, prefer “includeTypes first, else type,” then apply excludeTypes. Example refactor:

-  if (type !== undefined) {
-    baseQuery = baseQuery.where(FillColumns.type, type);
-  }
-
-  if (includeTypes !== undefined && includeTypes.length > 0) {
-    baseQuery = baseQuery.whereIn(FillColumns.type, includeTypes);
-  }
+  if (includeTypes !== undefined && includeTypes.length > 0) {
+    baseQuery = baseQuery.whereIn(FillColumns.type, includeTypes);
+  } else if (type !== undefined) {
+    baseQuery = baseQuery.where(FillColumns.type, type);
+  }
 
   if (excludeTypes !== undefined && excludeTypes.length > 0) {
     baseQuery = baseQuery.whereNotIn(FillColumns.type, excludeTypes);
   }

Please confirm desired semantics and whether any existing clients rely on intersection.


116-118: Nit: error message mentions “order query”.

This is in a fills store; update the message to “fill query” for clarity.

-    throw new Error('Cannot specify both subaccountId and parentSubaccount in order query');
+    throw new Error('Cannot specify both subaccountId and parentSubaccount in fill query');
indexer/packages/postgres/src/stores/order-table.ts (1)

158-164: Avoid surprising intersections; document precedence.

Same concern as fills: type + includeTypes currently intersect. Either:

  • Keep intersection and document in API docs; or
  • Prefer includeTypes when provided, else type, then apply excludeTypes.

Suggested tweak:

-  if (type !== undefined) {
-    baseQuery = baseQuery.where(OrderColumns.type, type);
-  }
-  if (includeTypes !== undefined && includeTypes.length > 0) {
+  if (includeTypes !== undefined && includeTypes.length > 0) {
     baseQuery = baseQuery.whereIn(OrderColumns.type, includeTypes);
-  }
-  if (excludeTypes !== undefined && excludeTypes.length > 0) {
+  } else if (type !== undefined) {
+    baseQuery = baseQuery.where(OrderColumns.type, type);
+  }
+  if (excludeTypes !== undefined && excludeTypes.length > 0) {
     baseQuery = baseQuery.whereNotIn(OrderColumns.type, excludeTypes);
   }

Add tests for: include-only, exclude-only, type+include (intersection/precedence), include+exclude overlap.

indexer/services/comlink/public/api-documentation.md (1)

1256-1281: Document precedence and array encoding for includeTypes/excludeTypes.

Great that the params and enums are listed. Please add:

  • Precedence: If type is also provided, do results equal intersection or does includeTypes override? State explicitly for orders and fills.
  • Array encoding examples: e.g., ?includeTypes=LIMIT&includeTypes=TWAP_SUBORDER and/or ?includeTypes=LIMIT,TWAP_SUBORDER based on supported parser.

Also applies to: 1383-1404, 2315-2357, 2548-2590

indexer/packages/postgres/src/types/query-types.ts (1)

154-156: Clarify and document precedence: type vs includeTypes/excludeTypes.

The implementation in indexer/packages/postgres/src/stores/order-table.ts (lines 155–164) and fill-table.ts (lines 167–176) chains type, includeTypes, and excludeTypes as AND conditions. When all three are provided, they can conflict and produce empty result sets unintentionally. Document the intended semantics—e.g., "includeTypes/excludeTypes take precedence if provided, else fall back to type"—or add validation to enforce a single filtering mode.

indexer/services/comlink/public/swagger.json (1)

3252-3273: Consider documenting parameter interaction.

The addition of includeTypes and excludeTypes alongside the existing type parameter could be confusing for API consumers. While the PR description mentions potential future deprecation of type, the current coexistence warrants clear documentation about:

  • How these parameters interact when used together
  • Which parameter takes precedence or how they combine
  • Migration guidance for users of the type parameter

Consider adding descriptions to these parameters in the OpenAPI spec to clarify their relationship.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 83d1e18 and bf64ca5.

📒 Files selected for processing (8)
  • indexer/packages/postgres/src/stores/fill-table.ts (4 hunks)
  • indexer/packages/postgres/src/stores/order-table.ts (2 hunks)
  • indexer/packages/postgres/src/types/query-types.ts (4 hunks)
  • indexer/services/comlink/public/api-documentation.md (7 hunks)
  • indexer/services/comlink/public/swagger.json (4 hunks)
  • indexer/services/comlink/src/controllers/api/v4/fills-controller.ts (13 hunks)
  • indexer/services/comlink/src/controllers/api/v4/orders-controller.ts (18 hunks)
  • indexer/services/comlink/src/types.ts (13 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: anmolagrawal345
Repo: dydxprotocol/v4-chain PR: 2779
File: protocol/x/clob/keeper/msg_server_place_order.go:131-132
Timestamp: 2025-04-04T18:38:17.320Z
Learning: The indexer event for TWAP orders will be implemented in a later PR, separate from the initial TWAP order placement functionality implementation.
Learnt from: anmolagrawal345
Repo: dydxprotocol/v4-chain PR: 2780
File: protocol/x/clob/keeper/twap_order_state.go:137-138
Timestamp: 2025-04-15T16:57:26.546Z
Learning: TWAP order cancellations and expiries will be handled in a dedicated follow-up PR, separate from the initial implementation of TWAP order functionality in the end blocker.
Learnt from: hwray
Repo: dydxprotocol/v4-chain PR: 2597
File: indexer/services/ender/src/scripts/handlers/dydx_update_perpetual_v1_handler.sql:16-20
Timestamp: 2024-11-22T18:12:04.606Z
Learning: Avoid suggesting changes to deprecated functions such as `dydx_update_perpetual_v1_handler` in `indexer/services/ender/src/scripts/handlers/dydx_update_perpetual_v1_handler.sql` if they are unchanged in the PR.
📚 Learning: 2025-05-30T17:01:07.514Z
Learnt from: Kefancao
Repo: dydxprotocol/v4-chain PR: 2869
File: indexer/services/roundtable/src/scripts/update_funding_payments.sql:55-61
Timestamp: 2025-05-30T17:01:07.514Z
Learning: In the dydx v4-chain funding payment system, if a clob_pair_id from the fills table doesn't exist in the perpetual_markets table, it represents a data integrity issue and those records should not be processed for funding payments. The INNER JOIN between net fills and perpetual_markets is intentional and serves as a data validation filter to ensure only valid perpetual market records are included in funding payment calculations.

Applied to files:

  • indexer/services/comlink/src/controllers/api/v4/fills-controller.ts
🧬 Code graph analysis (4)
indexer/packages/postgres/src/types/query-types.ts (1)
protocol/x/clob/types/orderbook.go (1)
  • FillType (188-188)
indexer/services/comlink/src/controllers/api/v4/orders-controller.ts (7)
indexer/services/comlink/src/types.ts (1)
  • RedisOrderMap (391-391)
indexer/packages/postgres/src/types/pagination-types.ts (1)
  • PaginationFromDatabase (1-6)
indexer/packages/postgres/src/types/db-model-types.ts (1)
  • OrderFromDatabase (57-85)
indexer/packages/postgres/src/types/websocket-message-types.ts (1)
  • APIOrderStatus (95-95)
indexer/packages/postgres/src/types/utility-types.ts (1)
  • IsoString (4-4)
indexer/services/comlink/src/helpers/redis/redis-controller.ts (1)
  • redisReadOnlyClient (23-23)
indexer/services/comlink/src/request-helpers/sanitizers.ts (1)
  • sanitizeArray (9-24)
indexer/services/comlink/src/types.ts (2)
indexer/packages/postgres/src/types/db-model-types.ts (4)
  • SubaccountFromDatabase (22-27)
  • AssetFromDatabase (151-157)
  • CandleFromDatabase (204-218)
  • VaultFromDatabase (324-330)
protocol/x/clob/types/orderbook.go (1)
  • FillType (188-188)
indexer/services/comlink/src/controllers/api/v4/fills-controller.ts (4)
indexer/packages/postgres/src/types/utility-types.ts (1)
  • IsoString (4-4)
indexer/packages/postgres/src/types/db-model-types.ts (1)
  • PerpetualMarketFromDatabase (87-106)
indexer/services/comlink/src/request-helpers/sanitizers.ts (1)
  • sanitizeArray (9-24)
indexer/services/comlink/src/types.ts (2)
  • FillRequest (499-505)
  • ParentSubaccountFillRequest (507-513)
⏰ 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). (29)
  • GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-auxo-lambda / (auxo) Build and Push Lambda
  • GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-bazooka-lambda / (bazooka) Build and Push Lambda
  • GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-vulcan / (vulcan) Build and Push
  • GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-ecs-service-roundtable / (roundtable) Build and Push
  • GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-ecs-service-socks / (socks) Build and Push
  • GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-ecs-service-ender / (ender) Build and Push
  • GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-ecs-service-comlink / (comlink) Build and Push
  • GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-ecs-service-socks / (socks) Build and Push
  • GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-auxo-lambda / (auxo) Build and Push Lambda
  • GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-vulcan / (vulcan) Build and Push
  • GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-bazooka-lambda / (bazooka) Build and Push Lambda
  • GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-ecs-service-roundtable / (roundtable) Build and Push
  • GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-ecs-service-ender / (ender) Build and Push
  • GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-ecs-service-comlink / (comlink) Build and Push
  • GitHub Check: lint
  • GitHub Check: test / run_command
  • GitHub Check: call-build-ecs-service-socks / (socks) Check docker image build
  • GitHub Check: check-build-bazooka
  • GitHub Check: call-build-ecs-service-roundtable / (roundtable) Check docker image build
  • GitHub Check: call-build-ecs-service-vulcan / (vulcan) Check docker image build
  • GitHub Check: build-and-push-mainnet
  • GitHub Check: call-build-ecs-service-comlink / (comlink) Check docker image build
  • GitHub Check: check-build-auxo
  • GitHub Check: call-build-ecs-service-ender / (ender) Check docker image build
  • GitHub Check: build-and-push-testnet
  • GitHub Check: run_command
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)
  • GitHub Check: Summary
🔇 Additional comments (18)
indexer/packages/postgres/src/types/query-types.ts (2)

32-33: Good addition to the query surface.

Adding INCLUDE_TYPES and EXCLUDE_TYPES to QueryableField looks consistent with usage downstream.


180-183: No issues found; FillQueryConfig changes are correct.

Verification confirms all upstream parsing and validation properly maps to FillType:

  • fill-table.ts queries use FillType for includeTypes/excludeTypes filtering
  • fill-model.ts schema validates type field as FillType enum
  • fills-controller.ts validates query parameters against Object.values(FillType)
  • Orders remain separate and correctly use OrderType, not FillType
  • All test fixtures consistently reference FillType values
indexer/packages/postgres/src/stores/fill-table.ts (2)

99-101: Param plumbing LGTM.

includeTypes/excludeTypes added to the function signature is consistent with FillQueryConfig.


259-261: Leaving TODO as-is.

Typing workaround acknowledged; no change required in this PR.

indexer/packages/postgres/src/stores/order-table.ts (1)

68-70: Signature update looks good.

New fields thread through cleanly with existing options.

indexer/services/comlink/src/types.ts (2)

98-98: Unrelated/nit changes.

These appear to be cosmetic or simple reformatting; no action needed.

Also applies to: 273-276, 303-303, 311-311, 401-401, 459-459, 481-481, 487-487, 524-524, 614-614, 722-722, 729-747


547-552: Order filters typed correctly with consistent array parsing and validation.

includeTypes?: OrderType[] and excludeTypes?: OrderType[] properly align with store layer handling and are consistently validated via sanitizeArray and validateArray in the orders controller before propagation to OrderQueryConfig. Same pattern verified in fills controller.

indexer/services/comlink/public/swagger.json (3)

2511-2532: LGTM! Well-structured parameter additions.

The includeTypes and excludeTypes parameters are properly defined as optional array query parameters with correct schema references to FillType.


2605-2626: LGTM! Consistent with the main fills endpoint.

Parameter definitions match the pattern established for /fills, ensuring API consistency.


3400-3421: LGTM! Consistent with main orders endpoint.

The parameter definitions maintain consistency with /orders. The same considerations about the type parameter interaction mentioned in the previous comment apply here as well.

indexer/services/comlink/src/controllers/api/v4/orders-controller.ts (4)

81-115: LGTM! Clean parameter propagation.

The includeTypes and excludeTypes parameters are properly added to the function signature and correctly passed to orderQueryConfig. The Postgres layer will handle the actual filtering logic.


130-159: LGTM! Formatting improvement.

The Promise.all restructuring enhances readability by placing type annotations on separate lines. No functional changes.


218-254: LGTM! Consistent parameter additions.

The controller methods properly accept and forward the new filter parameters to listOrdersCommon.


416-437: LGTM! Comprehensive validation.

The validation schema properly sanitizes and validates includeTypes and excludeTypes against allowed OrderType values with clear error messages.

indexer/services/comlink/src/controllers/api/v4/fills-controller.ts (4)

61-128: LGTM! Clean parameter integration.

The includeTypes and excludeTypes parameters are properly added to the method signature and correctly passed to FillTable.findAll for database-level filtering.


130-192: LGTM! Consistent with main fills endpoint.

Parameter additions mirror the pattern in getFills, maintaining consistency across parent and child subaccount queries.


224-283: LGTM! Well-structured validation and request handling.

The validation schemas and request handler properly implement the new filter parameters with:

  • Correct sanitization via sanitizeArray
  • Comprehensive validation against FillType values
  • Clear error messaging
  • Proper parameter forwarding to the controller

332-383: LGTM! Maintains consistency.

The parent subaccount endpoint validation and handler maintain the same high-quality pattern as the main fills endpoint.

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

🧹 Nitpick comments (2)
indexer/services/comlink/src/request-helpers/sanitizers.ts (2)

15-21: Consider filtering out empty strings from array input.

The array handling doesn't filter out empty strings. If query parameters are malformed (e.g., ?includeTypes=&includeTypes=LIMIT), empty strings could make it into the result array and cause validation failures downstream.

Apply this diff to filter empty strings:

     // Handle array input (repeated query parameters: ?includeTypes=LIMIT&includeTypes=MARKET)
     if (Array.isArray(input)) {
-      if (input.length === 0) {
+      const filtered = input.filter((item) => item.trim() !== '');
+      if (filtered.length === 0) {
         return null;
       }
-      return input.map((item) => item.toUpperCase());
+      return filtered.map((item) => item.toUpperCase());
     }

23-27: Consider trimming whitespace and filtering empty values from string input.

The string handling doesn't trim whitespace around commas or filter empty values. This could lead to unexpected results:

  • 'LIMIT, MARKET'['LIMIT', ' MARKET'] (leading space)
  • 'LIMIT,,MARKET'['LIMIT', '', 'MARKET'] (empty string)

These could cause validation failures downstream.

Apply this diff to handle these edge cases:

     // Handle string input (comma-separated: ?includeTypes=LIMIT,MARKET)
     if (input === '') {
       return null;
     }
-    return input.toUpperCase().split(',');
+    const values = input.toUpperCase().split(',').map((item) => item.trim()).filter((item) => item !== '');
+    return values.length === 0 ? null : values;
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 83a1f18 and 2e227f4.

📒 Files selected for processing (1)
  • indexer/services/comlink/src/request-helpers/sanitizers.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: anmolagrawal345
Repo: dydxprotocol/v4-chain PR: 2779
File: protocol/x/clob/keeper/msg_server_place_order.go:131-132
Timestamp: 2025-04-04T18:38:17.320Z
Learning: The indexer event for TWAP orders will be implemented in a later PR, separate from the initial TWAP order placement functionality implementation.
Learnt from: anmolagrawal345
Repo: dydxprotocol/v4-chain PR: 2780
File: protocol/x/clob/keeper/twap_order_state.go:137-138
Timestamp: 2025-04-15T16:57:26.546Z
Learning: TWAP order cancellations and expiries will be handled in a dedicated follow-up PR, separate from the initial implementation of TWAP order functionality in the end blocker.
Learnt from: hwray
Repo: dydxprotocol/v4-chain PR: 2597
File: indexer/services/ender/src/scripts/handlers/dydx_update_perpetual_v1_handler.sql:16-20
Timestamp: 2024-11-22T18:12:04.606Z
Learning: Avoid suggesting changes to deprecated functions such as `dydx_update_perpetual_v1_handler` in `indexer/services/ender/src/scripts/handlers/dydx_update_perpetual_v1_handler.sql` if they are unchanged in the PR.
⏰ 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). (33)
  • GitHub Check: test / run_command
  • GitHub Check: build-and-push-mainnet
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)
  • GitHub Check: (Dev) Build and Push ECS Services / call-build-and-push-vulcan / (vulcan) Build and Push
  • GitHub Check: (Dev) Build and Push ECS Services / call-build-and-push-bazooka-lambda / (bazooka) Build and Push Lambda
  • GitHub Check: (Dev) Build and Push ECS Services / call-build-and-push-auxo-lambda / (auxo) Build and Push Lambda
  • GitHub Check: (Dev) Build and Push ECS Services / call-build-and-push-ecs-service-roundtable / (roundtable) Build and Push
  • GitHub Check: (Dev) Build and Push ECS Services / call-build-and-push-ecs-service-ender / (ender) Build and Push
  • GitHub Check: (Staging) Build and Push ECS Services / call-build-and-push-ecs-service-ender / (ender) Build and Push
  • GitHub Check: (Dev) Build and Push ECS Services / call-build-and-push-ecs-service-socks / (socks) Build and Push
  • GitHub Check: (Dev) Build and Push ECS Services / call-build-and-push-ecs-service-comlink / (comlink) Build and Push
  • GitHub Check: (Dev2) Build and Push ECS Services / call-build-and-push-auxo-lambda / (auxo) Build and Push Lambda
  • GitHub Check: (Dev2) Build and Push ECS Services / call-build-and-push-bazooka-lambda / (bazooka) Build and Push Lambda
  • GitHub Check: (Dev2) Build and Push ECS Services / call-build-and-push-ecs-service-roundtable / (roundtable) Build and Push
  • GitHub Check: (Dev2) Build and Push ECS Services / call-build-and-push-ecs-service-socks / (socks) Build and Push
  • GitHub Check: (Dev2) Build and Push ECS Services / call-build-and-push-vulcan / (vulcan) Build and Push
  • GitHub Check: (Dev2) Build and Push ECS Services / call-build-and-push-ecs-service-ender / (ender) Build and Push
  • GitHub Check: (Staging) Build and Push ECS Services / call-build-and-push-ecs-service-comlink / (comlink) Build and Push
  • GitHub Check: (Staging) Build and Push ECS Services / call-build-and-push-auxo-lambda / (auxo) Build and Push Lambda
  • GitHub Check: (Staging) Build and Push ECS Services / call-build-and-push-ecs-service-socks / (socks) Build and Push
  • GitHub Check: (Dev2) Build and Push ECS Services / call-build-and-push-ecs-service-comlink / (comlink) Build and Push
  • GitHub Check: (Staging) Build and Push ECS Services / call-build-and-push-vulcan / (vulcan) Build and Push
  • GitHub Check: (Staging) Build and Push ECS Services / call-build-and-push-ecs-service-roundtable / (roundtable) Build and Push
  • GitHub Check: (Staging) Build and Push ECS Services / call-build-and-push-bazooka-lambda / (bazooka) Build and Push Lambda
  • GitHub Check: (Dev4) Build and Push ECS Services / call-build-and-push-ecs-service-ender / (ender) Build and Push
  • GitHub Check: (Dev4) Build and Push ECS Services / call-build-and-push-ecs-service-comlink / (comlink) Build and Push
  • GitHub Check: (Dev4) Build and Push ECS Services / call-build-and-push-bazooka-lambda / (bazooka) Build and Push Lambda
  • GitHub Check: (Dev4) Build and Push ECS Services / call-build-and-push-auxo-lambda / (auxo) Build and Push Lambda
  • GitHub Check: (Dev4) Build and Push ECS Services / call-build-and-push-vulcan / (vulcan) Build and Push
  • GitHub Check: (Dev4) Build and Push ECS Services / call-build-and-push-ecs-service-socks / (socks) Build and Push
  • GitHub Check: (Dev4) Build and Push ECS Services / call-build-and-push-ecs-service-roundtable / (roundtable) Build and Push
  • GitHub Check: Summary
🔇 Additional comments (1)
indexer/services/comlink/src/request-helpers/sanitizers.ts (1)

11-13: LGTM! Good type handling for flexible query parameter formats.

The function signature correctly handles both comma-separated strings and repeated query parameters, which aligns well with the PR's goal of adding flexible querying.

@anmolagrawal345 anmolagrawal345 merged commit ad6b321 into main Nov 6, 2025
33 checks passed
@anmolagrawal345 anmolagrawal345 deleted the anmol/twap-comlink branch November 6, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants