Author SHA1 Message Date
devadmin 2e66567643 Merge pull request 'Fix flaky ScorekeeperSessionTest' (#11) from fix/scorekeeper-test-flake into dev
CI / Build and check (push) Successful in 8m25s
CI / Deploy to Cloudflare Pages (push) Successful in 29s
2026-10-17 14:01:39 -06:00
Claude a8ff9863a6 Fix a race in ScorekeeperSessionTest's admittedGuest helper
CI / Build and check (pull_request) Successful in 8m32s
CI / Deploy to Cloudflare Pages (pull_request) Skipped
A guest counts as connected before the host's sheet has arrived over the socket, so
tests that read the guest's players straight away could see an empty list. The helper
now waits for the guest to hold the host's sheet. 0 failures in 12 runs (was ~1 in 3).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016eTor2tpxKb4dXbd8RqnvZ
2026-10-17 19:52:44 +00:00
devadmin bd12a7a70b Merge pull request 'Save state for every game between sessions' (#10) from feature/saved-games into dev
CI / Build and check (push) Successful in 8m28s
CI / Deploy to Cloudflare Pages (push) Successful in 31s
2026-10-17 13:19:05 -06:00
@@ -145,6 +145,11 @@ class ScorekeeperSessionTest {
await("$name to be asking") { host.state.requests.any { it.id == deviceId } }
host.session.allow(deviceId)
await("$name to be let in") { guest.state.value.connected }
// The sheet follows the connection over the socket, so `connected` can
// flip while it is still in flight. Callers read the guest's sheet at
// once (its players, its rounds), and on a slow runner that was an empty
// one: wait until the guest is looking at the host's.
await("$name to receive the sheet") { guest.state.value.sheet == host.state.sheet }
return guest
}