Symptom

Kraken nightly bug-hunt flagged DefaultNodeObserver.jobs as potentially mutated from multiple coroutines without synchronization.

Root cause

The hypothesis was a false positive — every access to jobs was already serialized through mutex.withLock { ... }. However, mutex was declared public (val mutex = Mutex()), which would allow external code to hold the same lock and accidentally cause a deadlock. No deduplication test existed to confirm that calling observe() twice for the same node correctly produces only one collection job.

Fix

Prevention