Skip to content

DF-22956: add NORMALIZE_CASE_INPUTS setting for case-insensitive asset handling#717

Open
cl-efornaciari wants to merge 1 commit intomainfrom
feature/DF-22956/normalize-case-inputs
Open

DF-22956: add NORMALIZE_CASE_INPUTS setting for case-insensitive asset handling#717
cl-efornaciari wants to merge 1 commit intomainfrom
feature/DF-22956/normalize-case-inputs

Conversation

@cl-efornaciari
Copy link
Contributor

@cl-efornaciari cl-efornaciari commented Mar 16, 2026

Summary

  • Adds a new NORMALIZE_CASE_INPUTS framework-level setting (default true) that uppercases base and quote input parameters before cache key computation and subscription registration, eliminating subscription churn and data loss caused by mixed-case requests for the same asset (e.g. USDe/USD vs USDE/USD).
  • Implements normalizeInputCase as a built-in request transform in AdapterEndpoint, ordered after symbolOverrider and before adapter-specific transforms.
  • Adapters that require case-sensitive identifiers (e.g. Tiingo) can opt out via envDefaultOverrides: { NORMALIZE_CASE_INPUTS: 'false' }.
  • Includes comprehensive unit tests covering default behavior, env var opt-out, envDefaultOverrides opt-out, interaction with symbolOverrider, and adapter-specific transform ordering.

Jira

DF-22956

Test plan

  • Unit tests for normalization on/off behavior
  • Unit tests for interaction with symbolOverrider
  • Unit tests for envDefaultOverrides opt-out
  • Unit tests for adapter-specific transforms running after normalization
  • Verify only base and quote fields are affected (not other params)
  • CI passes on this PR

…ndling

Adds a framework-level setting (default: true) that normalizes base and
quote input parameters to uppercase before cache key computation and
subscription registration. This prevents WebSocket subscription churn
when the same asset is requested with different casings (e.g. USDe vs USDE).

Adapters can opt out via envDefaultOverrides or the NORMALIZE_CASE_INPUTS
env var for cases where case-sensitive identifiers are required.

Refs: DF-22956
@github-actions
Copy link
Contributor

👋 cl-efornaciari, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link
Contributor

NPM Publishing labels 🏷️

🛑 This PR needs labels to indicate how to increase the current package version in the automated workflows. Please add one of the following labels: none, patch, minor, or major.

@cl-efornaciari cl-efornaciari changed the title feat: add NORMALIZE_CASE_INPUTS setting for case-insensitive asset handling DF-22956: add NORMALIZE_CASE_INPUTS setting for case-insensitive asset handling Mar 16, 2026
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.

1 participant