- characterisation scenarios for the hot-reload path (updateAll and
updateLoaded), which was previously untested: editing the running
event, removing the running event, and re-arming the loaded event
- direct tests for the parameterized cores against plain state objects
with no module mocks: the update tick arithmetic and finish trigger
window, added-time edge cases, and a documented matrix of the
expected-times projection (offset sign, gap absorption, linked
events, relative mode, delays and day offsets)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVTnCfesGNGwPQJwJ9FwoD
Locks down the current behaviour of the runtime state hot path before
any refactoring work:
- scenario driver and fixtures that script playback sequences against
the real runtimeState singleton with fake timers, mirroring the
EventTimer tick loop
- characterisation catalogue covering absolute/relative offsets,
expected group/flag/rundown times, gap compensation, delays,
countToEnd, addTime edge cases, pause accounting, roll modes and
playback across midnight
- broadcast-contract tests locking which top-level store keys are
emitted per action and tick, including the per-second gating and
integration throttling
- unit tests for the previously untested change-detection predicates
in runtime.utils.ts
The tests characterise current behaviour, including quirks (documented
inline): the entry diffing short-circuit that drips changed entries one
per broadcast, the sticky forceFinish flag after negative addTime, and
roll-continuation overwriting actualStart.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVTnCfesGNGwPQJwJ9FwoD