Skip to content

Fix search errors for numeric-looking player names - #2993

Merged
howardchung merged 1 commit into
odota:masterfrom
xrfc:fix/search-numeric-looking-names
Oct 15, 2026
Merged

howardchung merged 1 commit into
odota:masterfrom
xrfc:fix/search-numeric-looking-names

Conversation

@xrfc

@xrfc xrfc commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Number.isInteger(Number(query)) accepts inputs such as 1e3, 1.0, and 5., but the subsequent BigInt(query) call in isSteamID64() rejects those strings. This makes the search endpoint return an error before it can search player names.

  • Require a decimal digit string before entering the account-ID lookup, retaining the existing integer check and SteamID32/SteamID64 conversion.
  • Let other inputs continue through the existing nickname-search path. The existing minimum nickname-query length remains unchanged.
  • Add API regressions for all three reported inputs and a test that finds a player named 1e3, restoring the test fixture in finally.

Fixes #2992.

Validation

  • npm run typecheck — passed.
  • git diff --check — passed.
  • 14 isolated cases using the actual applied search function and SteamID helpers, with database calls stubbed — passed. These cover reproduction against the old implementation, the three fixed inputs, numeric-looking nicknames, SteamID32/64 lookup, and edge cases.
  • Full npm test has not been run locally because Docker is unavailable on this host. The suite requires PostgreSQL, Redis, Cassandra, MinIO, and parser services. The added HTTP regression tests still need the repository's integration CI.

@howardchung
howardchung merged commit 977868e into odota:master Oct 15, 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.

search() throws on some inputs

2 participants