Files
clean-architecture-frontend…/tests
DongHyeonkaandClaude Opus 5.5 8990f37cb1 fix(service-worker): keep an existing candidate cache when install fails (Q-6.6-8)
The static cache name is the asset-set digest, so a worker built with the same
assets (same VITE_BUILD_ID, new worker code) installs into the cache the active
worker serves from. A failed install then deleted that serving cache and its
activation marker. installStaticAssets now checks caches.keys() first and rolls
back (including the deferred post-deadline delete) only a cache this install
created. Rewriting an existing cache only puts identical sha256-verified bytes.
InstallDependencies.caches gains an optional keys(); without it the old
behavior (always roll back) is kept.

Verified: RED first (existing-candidate test saw one delete), then green; a
second test pins that a newly created candidate is still deleted. Gates:
check:architecture, types app/test/service-worker, lint, test:unit (only
pre-existing removal-fixture failure), test:component.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 13:37:56 +09:00
..