Symptom

Nightly bug-hunt flagged ServerBoss as a structured-concurrency lead: start() captures val taskSnapshot = tasks.toList() and only ever launches that snapshot. addTask() calls after start() has run only appended to tasks, which was never re-read — the task was silently registered but never launched. The bug was concrete enough that an existing unit test (ServerBossTest.kt) asserted it as intended behavior: “task snapshot is taken at start-time - task added after start is not launched.”

Root cause

The taskSnapshot fix in krill#346 (2026-06-04) solved a real ConcurrentModificationException race by snapshotting tasks under the mutex before launching — but that snapshot became the only source of truth for what gets launched. Nothing observed later additions to tasks, so any caller relying on addTask() being usable post-start() (hot-reload, dynamic plugin registration) would silently lose work with no error.

Fix

Prevention