Files
modelgrid/ts
jkunz 9f7308498c fix(cluster): skip persistence scheduling until initialize has run
schedulePersist and scheduleControlPersist can fire from configure() and
the public scheduling paths before initialize() has completed. Without a
guard, those queued microtasks call persistState/persistControlState,
which try to mkdir PATHS.DATA_DIR and write state files from tests and
short-lived scripts that never meant to touch the data directory. That
produced async-leak warnings in the Cluster manager unit tests and
left orphan directories on hosts that only constructed a ClusterManager
to inspect it.

Add an `initialized` flag set at the end of initialize() and early-return
from both schedulers when it is false. Real runtime paths always call
initialize() during Daemon startup, so this changes no production
behavior.
2026-04-21 12:39:50 +00:00
..
2026-01-30 03:16:57 +00:00