Files
moli/moli-core
ldm0 9eceff1f51 fix(service-workers): wait for clients.claim to apply control
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.
2026-11-22 02:02:08 +08:00
..