fix(rust): skip servers known down for a link code, hold syncs while offline (F6, F7)
Two findings of the step-2 player walk (2026-09-27, both rigs). F6, option (b) of the org lead (D186): a code no recent issuer holds - every made-up one - was still asked of every other enabled server, and while any of them was down the redeem waited out its whole timeout (12 s on both rigs). The second pass now skips the servers the board poll last saw without a connected game; they count as offline without the wait. Issuers are still asked whatever their state, so a good code on a down server stays "unsure". Live on the walk core: 338 ms with five servers down, 360 ms with a rig stopped as well. F7 (D187): on Carbon a due audit sync went out the moment the sidecar reconnected, 80 s before "Server startup complete". The worldReady hold reads the stored hello, which is the OLD boot's until the poll reads the new one. reasonToSync now also holds while the stored state says the game is not connected (online 0), which the poll writes the moment the server goes away. titleSync already held on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
This commit is contained in:
@@ -146,6 +146,13 @@ function reasonToSync({ desiredHash, sync, state, force }) {
|
||||
// the world is up, and the sync goes on the next tick. A human's "sync now" is
|
||||
// not held: they asked, and a failure then is theirs to read.
|
||||
if (state && state.worldReady === false) return null
|
||||
// Nor while the game is not connected (F7, the step-2 walk). The stored hello is
|
||||
// the LAST one: between a restart and the poll that reads the new boot's hello,
|
||||
// it still says the old world is ready. On Carbon a due audit went out in that
|
||||
// gap, 80 s before "Server startup complete". The poll marks the server offline
|
||||
// the moment it goes away, so offline holds until a fresh hello says otherwise.
|
||||
// Unknown (`online` absent) is not held — a state row always carries it.
|
||||
if (state && state.online !== undefined && state.online !== null && !Number(state.online)) return null
|
||||
if (!sync) return 'first'
|
||||
if (sync.state !== 'ok' && sync.lastAttemptAt && age(sync.lastAttemptAt) < FAIL_BACKOFF_MS && !sync.dirty) {
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user