mirror of
https://github.com/lexmount/moli.git
synced 2026-11-22 16:02:34 +00:00
Settle claim promises only after the owning worker run has applied the controller changes, and reject claims from inactive workers. Keep pending claim resolvers alive and route replies by request id to that worker run. Publish the activating worker as active before dispatching activate so waitUntil(clients.claim()) can complete. Retire the previous active worker and publish controller changes at this transition instead of deferring the claim until activation finishes. Queue functional events until activate finishes, including events received while the worker is still bootstrapping, without changing their run owner or counting them twice. Deliver startup claim replies through the exact starting run, and publish the worker handle before its parent message pump can process requests.