Skip to content

Conversation

@wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Aug 28, 2025

The strategies list returned by score-api now returns the correct property for overriding strategies snapshot-labs/score-api#1377

We were already reading this list, and assigning the override property in strategy.ts, but not using it.

This PR will use the strategies list from score-api as source of truth for overriding strategies

Tests

  • tests pass

@wa0x6e wa0x6e requested a review from Copilot August 28, 2025 21:48

This comment was marked as outdated.

@wa0x6e wa0x6e force-pushed the feat-pull-overriding-strategies-from-strategies-list branch from 1dfdecf to 35a58dc Compare August 28, 2025 22:03
@wa0x6e wa0x6e requested a review from Copilot August 28, 2025 22:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the strategy override detection to use the overriding strategies list from the score-api as the source of truth, replacing the hardcoded list of override strategy names.

  • Extracts overriding strategies from the score-api response using the override property
  • Simplifies the hasStrategyOverride function to use this dynamic list instead of hardcoded keywords
  • Adds comprehensive test coverage for the new override detection logic

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/helpers/strategies.ts Adds extraction and storage of overriding strategies from API response
src/helpers/utils.ts Simplifies override detection using dynamic strategy list
test/unit/helpers/utils.test.ts Adds comprehensive test coverage for the new override detection function

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@wa0x6e wa0x6e requested a review from ChaituVR August 28, 2025 22:05
@wa0x6e wa0x6e force-pushed the feat-pull-overriding-strategies-from-strategies-list branch from 7c25430 to 699420d Compare August 30, 2025 17:51
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