Commit Graph
3 Commits
Author SHA1 Message Date
DongHyeonkaandClaude Opus 5.5 39aa573746 fix(service-worker): fall back to the previous release cache for hashed assets (R-6.3)
onActivate keeps one previous release cache, but onFetch only ever read
the current one, so the retained cache was never used.

On a current-cache miss, onFetch now looks up the owned non-current cache
with the highest activation marker (same rule onActivate uses; extracted
as highestMarkedCache) and serves a valid 200 hit from it. Per D-7 this
only applies to content-hashed file names; any other URL goes to the
network as before. The hashed-name rule moves to
HASHED_STATIC_ASSET_NAME in src/contracts/service-worker.ts and the
build generator imports it, so the generator and the worker share one
definition.

Scope note: the fallback runs inside onFetch's VERIFIED_CACHE_FIRST
branch, i.e. for URLs in the current manifest. Old-build chunks that are
not in the current manifest stay network-only (R-6.6 limits interception
to manifest URLs).

RED before fix: "serves a hashed asset missing from the current cache
from the previous release cache (R-6.3)" got null. Guard test "never
answers a non-hashed URL from the previous release cache (D-7)" added.
Gates: check:architecture, check:types:{app,node,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
DongHyeonkaandClaude Opus 5.5 f0d3953ef2 fix(build): render product index before entry points (R-0)
src/.generated is gitignored, but no entry point rendered it, so a fresh
checkout failed check:architecture, check:types:app/node/test, unit and
component tests, verify:documentation, dev and build.

- run-vitest renders the index before starting Vitest (all vitest suites)
- package scripts that load src (dev, build, storybook, architecture,
  app/node/test type checks, the five fixtures that reach the index,
  verify:documentation) render it first; CI runs these scripts by name
- tests/unit/product-index-entrypoints.test.ts guards the wiring

Verified from a fresh state (src/.generated removed before each gate):
architecture, types app/node/test, lint, unit 1781/1781, component 132/132,
verify:documentation, build, dev (HTTP 200), check:ci all pass;
fixture route-runtime still fails with its expected TS2740.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 11:52:34 +09:00
donghyeon-ka 6f6c48ebb7 refactor: 도메인이 100개 1000개씩 늘어나도 유지보수 쉬운 구조로 변경 2026-09-24 00:42:21 +09:00