docs(recipes): Service Worker 레시피가 오프라인 셸을 약속하지 않게 한다
문제 catalog의 service-worker-pwa trigger는 "a measured offline-shell requirement"를 설치 조건으로 적고 failureKinds에 offline-fallback이 있다. 레시피 표도 "install/offline shell"이다. 그러나 reference 워커는 navigation을 NETWORK_ONLY로 두고, 사전 캐시에 index.html을 넣지 않으며, 설계는 cached index.html fallback을 금지한다(closed deep design 18.8). catalog를 보고 온 제품은 템플릿 파일을 고쳐야 한다는 것을 뒤늦게 알고, 이후 동기화마다 같은 파일에서 충돌한다(0929 리뷰의 memento 사례). 고른 방법 - 0929/06-03 최소 방향대로 주장을 설계에 맞춘다. trigger에서 오프라인 셸을 빼고 "navigation network-only, offline shell 없음, 별도 제품 capability"를 적는다. failureKinds의 offline-fallback을 offline-navigation-network-error로 바꾼다. - 레시피 3절 표를 고치고, 같은 절에 졸업 경로(넘겨받는 파일 넷, 다시 증명할 e2e 단언과 성질, 동기화 충돌)를 적는다. - 버린 대안: 선택 handler로 오프라인 셸 확장 지점을 만들기. 설계가 금지한 동작이고 재검토 조건(제품 요구)이 아직 없다. 위험·한계 - catalog 문구만 바뀐다. 오프라인 셸을 켜는 확장 지점은 여전히 없다. 검증 - json-schema 테스트 6건 통과, check:remediation-ledger· check:optional-recipe-fixtures PASS, verify:documentation PASS_SCOPED. Refs: docs/reviews/2026-11-03-maturity-review/06-adapters-service-worker-push.md 2절 0929/06-03
This commit is contained in:
@@ -137,12 +137,12 @@
|
||||
],
|
||||
"productionComposition": false
|
||||
},
|
||||
"trigger": "Installability, a measured offline-shell requirement, or an explicitly owned public HTTP representation cache is approved.",
|
||||
"trigger": "Installability or an explicitly owned public HTTP representation cache is approved. The reference worker keeps navigation network-only and has no offline shell; an offline document is a separate product capability (closed deep design 18.8).",
|
||||
"forbiddenWhen": ["Hosting cache and worker cache ownership conflict.", "Update and rollback UX is undefined.", "Authenticated, private, opaque or personal responses would be cached.", "Cache freshness, byte and entry limits are undefined."],
|
||||
"boundary": "bootstrap update controller plus platform-local public Request/Response cache administration",
|
||||
"port": "ServiceWorkerUpdatePort / PublicResponseCacheAdmin recipe / PublicResponseCachePort / PublicResponseCacheAdminPort reference runtime",
|
||||
"fake": "FakeServiceWorkerUpdateAdapter / MemoryPublicResponseCache",
|
||||
"failureKinds": ["stale-worker", "update-loop", "offline-fallback", "incomplete-candidate", "integrity-mismatch", "cache-policy-rejection", "quota"],
|
||||
"failureKinds": ["stale-worker", "update-loop", "offline-navigation-network-error", "incomplete-candidate", "integrity-mismatch", "cache-policy-rejection", "quota"],
|
||||
"lifecycleMethods": ["unregister", "rollback", "delete-owned-caches"],
|
||||
"owner": "project-owner-required",
|
||||
"securityPrivacy": ["Cache only explicit same-origin public GET representations.", "Never cache authenticated, cookie-dependent, private, no-store, opaque or personal responses.", "Bind candidate cache names to release identity and a canonical manifest digest that includes normalized expectedContentType, exact request identity, expected byte length and integrity digest.", "Reject a response whose normalized Content-Type differs from manifest expectedContentType even when body integrity matches.", "Derive cleanup retention only from the verified active pointer and composition retainedPreviousReleaseCount; cleanup callers cannot submit cache names, release registry IDs or any retain set.", "Read active-pointer and release-marker control JSON through a strict UTF-8 stream capped at exactly 2 MiB (2097152 bytes), cancel on overflow and fail closed before parsing oversized metadata.", "Keep exact query and Vary semantics; ignoreSearch and ignoreVary are forbidden.", "Fail closed on malformed update metadata or integrity mismatch."],
|
||||
|
||||
@@ -108,7 +108,7 @@ type은 facade 밖으로 노출하지 않는다.
|
||||
| --- | --- | --- | --- |
|
||||
| realtime | foreground ordered event 또는 duplex protocol이 확정됨 | focus refetch/manual refresh가 충분하거나 ordering·replay owner 없음 | bounded polling 또는 stale UI |
|
||||
| offline/IndexedDB/OPFS | structured offline data/queue 또는 large local binary가 제품 요구 | credential, partition/retention/recovery 미정, HTTP cache로 충분 | read-only/online-only 또는 승인된 bounded Blob |
|
||||
| Service Worker/Cache Storage | install/offline shell 또는 public HTTP representation cache owner 승인 | auth/private/opaque cache, update/rollback UX 없음 | hosting cache 기반 network app |
|
||||
| Service Worker/Cache Storage | 설치형(installability) 또는 public HTTP representation cache owner 승인. 오프라인 셸은 지원하지 않는다(이 절 끝) | auth/private/opaque cache, update/rollback UX 없음 | hosting cache 기반 network app |
|
||||
| file/picker/download | selection/preview/upload/download와 bounded memory/integrity 요구 | backend 재검증 없음, whole-buffer large file, long-lived credential URL | native input + authorized direct download |
|
||||
| generated API | versioned source와 drift CI가 있음 | DTO가 domain/UI로 노출됨 | typed request builder + schema |
|
||||
| feature flag | rollout/kill switch owner와 default 있음 | authorization에 사용 | typed local default |
|
||||
@@ -152,6 +152,17 @@ Service Worker를 켤 때 확인할 것(06-05). 템플릿은 1·6·7과 2의 시
|
||||
비교한다. 준비 단계에서 실패하면 helper(`tests/e2e/support/service-worker-builds.ts`)
|
||||
머리 주석의 전제 목록과 두 spec 머리 주석에서 바뀐 곳을 찾는다.
|
||||
|
||||
오프라인 셸(0929/06-03): reference 워커는 navigation을 가로채지 않는다
|
||||
(`service-worker-static-assets.ts` navigation `NETWORK_ONLY`,
|
||||
`service-worker-lifecycle.ts` `intercepts`). 사전 캐시는 해시 이름의
|
||||
`assets/`뿐이고 `index.html`은 넣지 않는다(`scripts/generate-service-worker-assets.ts`).
|
||||
설계가 cached `index.html` fallback을 금지한다(closed deep design 18.8). 오프라인
|
||||
셸이 필요한 제품은 템플릿 워커를 켜는 것으로 얻지 못한다. 별도 제품 capability로
|
||||
설계하고, 그때 넘겨받는 파일은 위 세 파일과 `vite.service-worker.config.ts`다.
|
||||
`tests/e2e/service-worker-update.spec.ts`의 사전 캐시 단언과 "HTML과 자산은 같은
|
||||
release" 성질은 제품이 다시 증명한다. 넘겨받은 뒤에는 템플릿 동기화에서 이 파일들이
|
||||
충돌한다.
|
||||
|
||||
Web Push target은 현재 13번째 설치 recipe가 아니다. 기존 `realtime`,
|
||||
`service-worker-pwa`, `browser-permission`의 인접 경계를 조합해야 하는 별도
|
||||
`NOT_SELECTED` capability다. 실제 선택 전 VD-10 amendment와 machine-readable
|
||||
|
||||
Reference in New Issue
Block a user