fix(client): make data-tiles ready when the pass completes

A transient tile load error is terminal for the current window (retried only on
a new window or a reconnect), but data-tiles treated it as never settled, so one
host hiccup left it at 'loading' forever and every e2e readiness wait hung
(audit.test.mjs timed out under a parallel lane). TileScheduler.isPending() now
reports loading only for queued/in-flight tiles; ready means the pass is done.
Proven by aborting one tile request: the wait timed out before, passes after.
Unit-tested at the scheduler seam.
This commit is contained in:
2026-11-21 18:19:47 +01:00
parent ac5a6ac8dc
commit 9c05bb1f46
6 changed files with 63 additions and 32 deletions
+13
View File
@@ -150,6 +150,19 @@ describe('TileScheduler', () => {
expect(h.calls).toEqual([list[0], list[0], list[1]])
})
it('is not pending once a transient failure has settled this pass', async () => {
const h = harness()
const list = urls(2)
h.scheduler.setDesired(list)
expect(h.scheduler.isPending(list)).toBe(true) // both in flight
h.settle(list[0] as string, 'error')
h.settle(list[1] as string, 'ok')
await flush()
// The stored error is terminal until a new window or a reconnect: readiness must not wait on it.
expect(h.scheduler.isPending(list)).toBe(false)
expect(h.scheduler.isComplete(list)).toBe(false)
})
it('markLoaded satisfies a tile from the texture cache without a request', () => {
const h = harness()
const list = urls(1)