fix(service-worker): 제품 활성화 칸을 열고 갱신 실패를 관측한다
frontend-quality-gates / merge / static checks (pull_request) Successful in 1m17s
frontend-quality-gates / merge / tests (pull_request) Successful in 11m53s
frontend-quality-gates / merge / browser tests (pull_request) Successful in 5m36s
frontend-quality-gates / FE-GATE-017 / diagram-review (pull_request) Skipped
frontend-quality-gates / main / self-tests and removal drills (pull_request) Skipped
frontend-quality-gates / FE-GATE-014 / config-compatibility (pull_request) Skipped
frontend-quality-gates / FE-GATE-028 / manual-accessibility-review (pull_request) Skipped
frontend-quality-gates / FE-GATE-026 / lab-performance (pull_request) Skipped
frontend-quality-gates / FE-GATE-015 / immutable-release-candidate (pull_request) Skipped
frontend-quality-gates / external-vulnerability-provider (pull_request) Skipped
frontend-quality-gates / external-provenance-provider (pull_request) Skipped
frontend-quality-gates / promote-verified-immutable-candidate (pull_request) Skipped
frontend-quality-gates / deploy-promoted-release (pull_request) Skipped
frontend-quality-gates / FE-GATE-019 / hosting-header (pull_request) Skipped
frontend-quality-gates / FE-GATE-021 / runbook-boot-config (pull_request) Skipped
frontend-quality-gates / FE-GATE-022 / runbook-chunk-mismatch (pull_request) Skipped
frontend-quality-gates / FE-GATE-023 / runbook-api-degradation (pull_request) Skipped
frontend-quality-gates / FE-GATE-024 / runbook-telemetry (pull_request) Skipped
frontend-quality-gates / FE-GATE-025 / runbook-release-rollback (pull_request) Skipped
frontend-quality-gates / FE-GATE-018 / field-web-vitals (pull_request) Skipped
frontend-quality-gates / merge / static checks (pull_request) Successful in 1m17s
frontend-quality-gates / merge / tests (pull_request) Successful in 11m53s
frontend-quality-gates / merge / browser tests (pull_request) Successful in 5m36s
frontend-quality-gates / FE-GATE-017 / diagram-review (pull_request) Skipped
frontend-quality-gates / main / self-tests and removal drills (pull_request) Skipped
frontend-quality-gates / FE-GATE-014 / config-compatibility (pull_request) Skipped
frontend-quality-gates / FE-GATE-028 / manual-accessibility-review (pull_request) Skipped
frontend-quality-gates / FE-GATE-026 / lab-performance (pull_request) Skipped
frontend-quality-gates / FE-GATE-015 / immutable-release-candidate (pull_request) Skipped
frontend-quality-gates / external-vulnerability-provider (pull_request) Skipped
frontend-quality-gates / external-provenance-provider (pull_request) Skipped
frontend-quality-gates / promote-verified-immutable-candidate (pull_request) Skipped
frontend-quality-gates / deploy-promoted-release (pull_request) Skipped
frontend-quality-gates / FE-GATE-019 / hosting-header (pull_request) Skipped
frontend-quality-gates / FE-GATE-021 / runbook-boot-config (pull_request) Skipped
frontend-quality-gates / FE-GATE-022 / runbook-chunk-mismatch (pull_request) Skipped
frontend-quality-gates / FE-GATE-023 / runbook-api-degradation (pull_request) Skipped
frontend-quality-gates / FE-GATE-024 / runbook-telemetry (pull_request) Skipped
frontend-quality-gates / FE-GATE-025 / runbook-release-rollback (pull_request) Skipped
frontend-quality-gates / FE-GATE-018 / field-web-vitals (pull_request) Skipped
문제: SW를 켠 제품이 새 버전 안내·reload 안내를 붙이려면 템플릿 파일을 고쳐야 한다(1103/09-05). 설치에 실패한 갱신(redundant)과 실패한 주기 검사는 아무 기록도 남기지 않는다(0925/06-05). build.assetsDir를 바꾸면 사전 캐시가 조용히 빈다(0925/06-08). 릴리스마다 바뀌지 않은 자산까지 no-store로 다시 받는다(1101/06-05). 쓰지 않는 protocol kind 셋과 reload guard 상수, void 참조, 손으로 쓴 protocol 버전 1, web-push의 fence 검사 두 벌이 남았다(1101/06-03, R1~R3). 고른 방법: - ProductServiceWorkerWiring에 onUpdateWaiting(activate)· onReloadRequired()를 더한다(추가만). create-runtime-composition이 worker 시작 전에 host 이벤트를 구독해 부르고, 던지면 버린다. page controller는 시작 때 이미 기다리던 갱신도 onUpdateWaiting 구독자에게 알린다. - page controller가 update_install REDUNDANT, update_check FAILED를 observe로 낸다. - 사전 캐시 생성기와 SW 설치가 빈 asset 목록을 거절하고, 시험이 vite.config.ts의 build.assetsDir와 BUILD_ASSET_DIRECTORY를 대조한다 (vite.config.ts는 그룹 C가 고치는 파일이라 건드리지 않았다). - 설치가 이전 릴리스 캐시의 같은 URL을 digest로 다시 확인해 복사하고, 없거나 맞지 않을 때만 받는다. - PAGE_HELLO·WORKER_HELLO_ACK·UPDATE_READY, reloadGuard*· retainedPreviousCaches를 지운다. sync 알림은 createServiceWorkerMessage로 만든다. fence 검사는 push-association-fence-store.ts 하나다. 버린 대안: 활성화 화면을 presentation 슬롯으로 열기 — 화면 문구와 흐름은 제품 것이라 조합 계약의 함수 칸이 작다. 위험·한계: 지운 kind는 보내는 곳이 없었다. 다른 빌드의 worker가 보내도 UNKNOWN_KIND로 관측만 된다. 재사용은 이전 캐시를 읽는 비용이 들고, 읽기 실패는 다운로드로 돌아간다. 검증: desktop check:types·lint·check:architecture· check:adapter-inventory rc=0, SW 시험 묶음 통과 (/tmp/claude-gates/r9b-pr1-quick). merge 단계는 PR 본문. Refs: 1103/09-05, 0925/06-05, 0925/06-08, 1101/06-03, 1101/06-05, 1101/R1, 1101/R2, 1101/R3
This commit is contained in:
@@ -94,6 +94,13 @@ export async function collectStaticAssets(
|
||||
});
|
||||
}
|
||||
|
||||
// 0925/06-08. Nothing under the directory means vite.config.ts moved the
|
||||
// hashed files (`build.assetsDir`) away from the one the worker reads.
|
||||
if (assets.length === 0) {
|
||||
throw new Error(
|
||||
`No hashed static asset under ${BUILD_ASSET_DIRECTORY} in the build: vite.config.ts build.assetsDir must name the directory BUILD_ASSET_DIRECTORY (src/contracts/service-worker.ts) names.`,
|
||||
);
|
||||
}
|
||||
// 1112/06-02. The count and the bound, so the failure says how far over
|
||||
// it is. Each generated feature adds its lazy chunks here: with the Service
|
||||
// Worker on, the asset bound can come before the initial JavaScript budget.
|
||||
|
||||
Reference in New Issue
Block a user