mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 08:23:45 +00:00
caece00e7f
Races 5 concurrent identical CompleteResultWithResult calls for the same RESULT_PENDING match against a real PostgreSQL instance -- the scenario behind 8.25's 'identical duplicates idempotent' claim, which every existing result test only exercised sequentially. All five must succeed (idempotent replay, not conflict), and the rating update must apply exactly once: asserted by computing the expected post-match rating independently via the same domain.CasualOpponents/UpdateRating functions and requiring an exact match, since a doubled application would compound the rating further away from baseline rather than merely producing 'some' change that a looser inequality check would miss. First draft asserted ranked_games == 1, which doesn't hold for a casual result (rankedIncrement is unconditionally 0 for casual by design) -- caught by actually running it, not by inspection. Verified clean across 6 runs with -race, plus the full integration and unit suites.