• Mahmoud Aglan's avatar
    test: mark every test account, and prove the pools never mix · 9ce197dd
    Mahmoud Aglan authored
    Every account helper in tests/play sets profiles.is_test right after the
    account is made (guest or GoTrue admin), before it can queue, and fails
    loudly when the marker did not stick.
    
    tests/play/match-pool.mjs: two test accounts and two unmarked stand-ins for
    real players, made with the admin API (no guest signups). In every public
    queue, in a bucket the app never offers a real player where the game has
    one, a test account is not seated with a real player waiting longer, by the
    queue call or the status poll; two test accounts are seated together on both
    paths; a real player searching passes a waiting test account; two real
    players still pair; domino's public tables keep apart the same way; and a
    player's own token cannot set is_test either way. Against the code before
    the fix it fails 42 checks; after, 63 of 63 pass. Teardown is verified.
    Co-Authored-By: 's avatarClaude Opus 5.5 <noreply@anthropic.com>
    9ce197dd
backgammon.mjs 55.1 KB