Reference in New Issue
Block a user
Delete Branch "fix/script-scheduler-seam-16-18"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #16 and #18.
#18 — injection seam.
ScriptExecutionSchedulerwas reached via its staticShared()singleton directly inside all five consumers (ScriptActor, ScriptExecutionActor, AlarmActor, AlarmExecutionActor, ScriptSchedulerStatsReporter), so it was un-substitutable. Each now takes an optional scheduler param: the Host injects nothing and gets the shared pool (byte-for-byte unchanged); a test (or future multi-site host) can hand an actor its own instance. Spawning actors thread it down to their execution children.Shared()also recreates a disposed cached instance rather than returning it (newIsDisposedguard), closing #18's latent disposed-singleton poisoning.#16 — flake. ScriptActorTests now runs on its own scheduler, disposed at class teardown, so the faulted-task test can no longer strand a worker on the process-wide pool and starve other test classes. EvalGate's wait is bounded to 30s (was unbounded — the leak), reset per test, and teardown releases one permit per worker instead of Release(Entries) (which under-released in exactly the failure case).
Verification: full solution build 0/0; SiteRuntime suite 6/6 runs green (524/524 each) — was 3/6 failing on clean main. Component-SiteRuntime.md updated.