Files
clean-architecture-frontend…/src/adapters
DongHyeonkaandClaude Opus 5.5 47832fbe65 fix(service-worker): pair drain replies by worker build and nonce (R-6.2)
The waiting worker sent CLIENT_DRAIN_REQUEST with
`targetBuildId: requesterBuildId`, so a tab on any other build dropped
it as TARGET_BUILD_MISMATCH, and the worker also ignored replies whose
`sourceBuildId` differed from the requester's. With a build N tab and a
reloaded build N+1 tab open, every activation ran into the 30s
CLIENT_DRAIN_TIMEOUT.

The drain request is now untargeted and replies are paired only by the
worker's own buildId (reply target), the nonce and the exact client id.
The unused requesterBuildId field and parameter are removed.

RED before fix: "page ↔ worker activation seam > drains tabs of another
build and completes the activation (R-6.2)" resolved CLIENT_DRAIN_TIMEOUT.
The test wires two page controllers (builds N and N+1) to one worker
runtime with async postMessage in both directions.
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>
2026-09-24 12:28:38 +09:00
..