Skip to content

fix: validate ams bot tokens in naming convention tests - #9943

Draft
prajwalu142 wants to merge 1 commit into
masterfrom
fix/addBotTokenEntriesToNamingTests
Draft

prajwalu142 wants to merge 1 commit into
masterfrom
fix/addBotTokenEntriesToNamingTests

Conversation

@prajwalu142

@prajwalu142 prajwalu142 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Currently the naming convention tests skip ams tokens. Add botTokens and botOfcTokens to the naming tests so that any bad entry is caught early.

What changed

  • Include botTokens and botOfcTokens in the allTokens list of modules/statics/test/unit/tokenNamingConvention.ts, so AMS-onboarded tokens flow through the same naming validations as every other token.
  • Import both lists with relative paths (../../src/coins/...). The previous non-relative modules/statics/... imports were resolved as an external package named modules, which is what failed the code-quality (dependencies) check.
  • Apply the testnet t-prefix and mainnet t-rules to the underlying coin name for OFC tokens, which are named ofc + the coin name (e.g. ofctsol:usdc is ofc + tsol:usdc). Correctly named OFC entries pass, and only genuine deviations surface — otherwise every future correctly named OFC testnet token would fail the raw t rule and need a permanent exception.
  • Document the pre-existing AMS entries that legitimately deviate from the conventions (Hoodi hteth on-chain symbol names such as hteth:WBTC, ethx1, and the WBTC casing) in the exception lists, matching how earlier AMS tokens were handled. No token definitions were changed — e.g. hteth:wbtc already exists in erc20Coins, so hteth:WBTC cannot be renamed without colliding.

Why

Auto-AMS onboarded tokens bypassed every naming validation because the naming tests did not include the bot token lists, so bad entries could ship unnoticed (see the thread referenced in CSHLD-1931). With this change, future AMS entries are validated on arrival; only the listed pre-existing entries are exempted.

Verification

  • Full @bitgo/statics unit suite: 39,670 passing, 0 failing (includes the 5 token naming convention tests and the 4 OFC naming tests)
  • yarn run check-deps passes (previously failed on the phantom modules package)
  • prettier --check clean in modules/statics

Ticket: CSHLD-1931

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Unit tests are failing on Node 26.x (Current release line, non-blocking). This is not an LTS version yet, so it does not block merge, but it signals an incompatibility to fix before Node 26.x becomes LTS.

View run

@linear-code

linear-code Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

CSHLD-1931

@ralph-bitgo
ralph-bitgo Bot force-pushed the fix/addBotTokenEntriesToNamingTests branch from 04ce734 to 41d75b3 Compare October 13, 2026 20:10
@ralph-bitgo ralph-bitgo Bot changed the title fix: add ams tokens in naming tests fix: validate ams bot tokens in naming convention tests Oct 13, 2026
@prajwalu142
prajwalu142 marked this pull request as ready for review October 14, 2026 06:41
@prajwalu142
prajwalu142 requested a review from a team as a code owner October 14, 2026 06:41
@prajwalu142
prajwalu142 force-pushed the fix/addBotTokenEntriesToNamingTests branch 2 times, most recently from daee065 to f02a928 Compare October 14, 2026 06:47
AMS tokens were missing from the name convention
tests which caused issues downstream.Pass them in
the test file which ensures the conventions aren't broken

Ticket: CSHLD-1931
@prajwalu142
prajwalu142 force-pushed the fix/addBotTokenEntriesToNamingTests branch from f02a928 to 6db7d7a Compare October 14, 2026 06:48
@prajwalu142
prajwalu142 marked this pull request as draft October 14, 2026 06:49

This branch has not been deployed

No deployments
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