Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.

feat: pull overriding strategies from strategies list#585

Open
wa0x6e wants to merge 7 commits into
masterfrom
feat-pull-overriding-strategies-from-strategies-list
Open

feat: pull overriding strategies from strategies list#585
wa0x6e wants to merge 7 commits into
masterfrom
feat-pull-overriding-strategies-from-strategies-list

Conversation

@wa0x6e

@wa0x6e wa0x6e commented Aug 28, 2025

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

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.

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.

Comment thread src/helpers/strategies.ts
@wa0x6e
wa0x6e requested a review from ChaituVR August 28, 2025 22:05
Comment thread src/helpers/utils.ts Outdated
Co-authored-by: Chaitanya <yourchaitu@gmail.com>
@wa0x6e
wa0x6e force-pushed the feat-pull-overriding-strategies-from-strategies-list branch from 7c25430 to 699420d Compare August 30, 2025 17:51
@wa0x6e
wa0x6e requested a review from ChaituVR February 4, 2026 20:55
Comment thread src/helpers/utils.ts
Comment thread src/helpers/strategies.ts
@wa0x6e
wa0x6e requested a review from ChaituVR March 5, 2026 07:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants