register() resolves while the first worker is still installing. With no
active or waiting worker, start() fell through to ACTIVE, and kept doing
so on every visit even when the install failed.
When there is no active worker, start() now waits for the installing
worker to reach `activated` or `redundant`, bounded by the worker's own
install deadline (installDeadlineMs) and by stop(). Activated -> the
existing RELOAD_TO_ENABLE path (no clients.claim()); redundant ->
FAILED INSTALL_FAILED; deadline -> FAILED INSTALL_TIMEOUT; no worker at
all -> FAILED INSTALL_FAILED. start() is fire-and-forget after mount,
so the wait does not block rendering.
Test fixture: pageContainer gains an `installing` option backed by a
statechange-capable fake worker.
RED before fix (both resolved ACTIVE immediately):
- does not report a first install as ACTIVE while it is installing (R-6.4)
- reports a failed first install instead of ACTIVE (R-6.4)
Gates: check:architecture, check:types:{app,test,service-worker}, lint,
test:component pass. test:unit passes except the pre-existing
removal-fixture.test.ts case that needs generated release evidence
under artifacts/ (absent in a fresh worktree; unrelated to this diff).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>