fix(playtest): stop rejecting real Steam keys on a guessed alphabet #245
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github-actions
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Evobug/api!245
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/steam-key-alphabet"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A 100-key batch downloaded from the Steam partner site imported as 38 imported / 62 invalid. The keys were fine —
STEAM_KEY_REwas not.It excluded
I,O,Sand0, documented as "those are excluded by Valve to avoid confusion". That is folklore from the old retail CD keys. The rejected keys in that batch visibly contain bothIand0:Interestingly the batch also rules out the opposite extreme: with a full 36-character alphabet only ~17% of keys would survive a 4-character exclusion, and 38% did. So Valve does omit something — plausibly
OandS, of which the batch shows no instance. Guessing which characters is exactly what caused this, so the fix does not guess again.Change
/^[A-HJ-NP-RT-Z1-9]{15}$/→/^[A-Z0-9]{15}$/. Structure only: 15 alphanumerics after normalisation.Valve is the authority on whether a key is real, and it says so at redemption. The two failure modes are not symmetric — a false reject silently discards paid inventory and keeps no record of what it dropped (rejected candidates are skipped, never stored, and only a masked form is echoed back), while a false accept surfaces the moment a tester tries the key.
Blast radius
Nothing was lost in the failed import, and re-uploading the same file is idempotent: duplicates collapse in-batch and again on the
keyFingerprintunique index, so the 62 import and the 38 return asduplicates.Tests
Both specs encoded the wrong assumption and now assert the opposite, including the exact shapes from the real batch. 707 pass / 0 fail, tsgo clean, oxlint unchanged against baseline (16 pre-existing warnings on the touched files, before and after).
🤖 Generated with Claude Code