Node timers can fire a sub-millisecond early relative to performance.now(); Math.floor((now - scheduledFor) / TICK_MS) then yields -1, and (1 + extra) shaved a whole tick off the next schedule. The resulting delay-0 re-fire doubled the sim rate (~33-40Hz observed on the live arena during integration testing; local repro confirmed it is the scheduler, not the host). Clamp extra to [0, TICK_CATCHUP_CAP] and add a wall-clock regression test that pins driftReport ticksRun to ~20/s (fails at the doubled rate). |
||
|---|---|---|
| .. | ||
| audit | ||
| e2e | ||
| fixtures | ||
| int | ||
| push-schema.ts | ||
| seed-baseline.ts | ||
| test-db.ts | ||
| vitest-global.ts | ||
| vitest-teardown.ts | ||