SW-URL-01: canonicalize each generated root-relative manifest URL against the registration scope once, re-check same-origin, and share that absolute identity across install cache keys, fetch classification and cache lookup or delete. Previously every verified asset fell through to the network. SW-01: serve verified static requests only from the current release cache. A CacheStorage-wide match could return a previous release's response for the same URL while the delete targeted a cache that was never read. The worker scope facade no longer exposes a wide match at all. SW-02: cache reset deletes only names that parse as owned, so a foreign cache sharing the ca-static-v1- prefix survives. SW-03: unregister() resolving to false is a FAILED unregister, not UNREGISTERED. SW-04: staged removal reports what happened - ABSENT, UNREGISTERED and PURGED map to DISABLED, OWNERSHIP_MISMATCH to INCOMPATIBLE and FAILED to FAILED - so a later release cannot delete the worker while a registration or owned cache is still present. SW-05: add the runtime-neutral service-worker-static-manifest codec that owns exact row keys, the extension and content-type allowlist, the root-relative URL rule and the length-prefixed canonical bytes. The generator and the build gate hash those same bytes, and the build gate now decodes and recomputes the set digest instead of type-casting the manifest. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
22 KiB
Adapter Remediation Ledger
Source of truth for the execution state of every confirmed finding in
docs/reviews/adapters/.Plan: 2026-08-13 adapter remediation. Baseline revision:
develop/4dc033cf33a5b6173bbf960d5eb464a406dc4c92.
Containment state (plan Task 1, Step 1)
Scan performed on the baseline revision:
rg -n "createBrowserOpfsRuntime|createBrowserFileRuntime|createPublicResponseCache|createBrowserRpcRuntime|createWebPush|createServiceWorker|createResumableUpload|createImageCdn" src recipes tests
rg -n "AVAILABLE_NOT_COMPOSED|DESIGNED_NOT_IMPLEMENTED|NOT_SELECTED" docs/architecture src/bootstrap
Result:
| Capability | Template default composition | Containment action |
|---|---|---|
OPFS byte store (createBrowserOpfsRuntime) |
Not composed. Only recipes/frontend-capabilities/* reference the "OPFS" backend literal in contract/fake code. |
None required. No V1 writer is admitted, so no kill switch is invented. |
| Browser files runtime | Not composed in src/bootstrap/**. |
None. |
| Public response cache | Not composed; only tests/unit/public-response-cache.test.ts constructs it. |
None. |
| Browser RPC runtime | Not composed; AVAILABLE_NOT_COMPOSED. |
None. |
| Web Push | Not composed; NOT_SELECTED / AVAILABLE_NOT_COMPOSED. |
None. |
| Resumable upload / image CDN | Not composed; test-only construction. | None. |
| Service Worker runtime host | Composed conditionally through src/bootstrap/optional-runtime-host.ts → createServiceWorkerRuntimeHost, gated by ResolvedRuntimeCapabilities. |
Stays as-is. Task 14 fixes truthfulness without changing selection. |
| Realtime | src/bootstrap/optional-runtime-host.ts:91 keeps realtime NOT_SELECTED with realtime: null. |
None. |
No product-specific composition root outside the template default exists in this repository, so there is no OPFS V1 write admission to close.
Baseline gates (plan Task 1, Step 3)
Captured on the baseline revision before any source change.
| Command | Exit code | Result |
|---|---|---|
corepack pnpm check:types |
0 | app, node, test, recipes, web-worker, service-worker projects all pass. |
corepack pnpm lint |
0 | --max-warnings=0 clean. |
corepack pnpm check:architecture |
0 | 286 modules, 854 dependencies, all imports resolved; 12 graph fixtures PASS; TS-only policy PASS; allowed PASS / 9 forbidden rejected. |
corepack pnpm test:unit |
1 | 110 passed / 1 failed test files; 1496 passed / 19 failed tests (1515 total), 150.92s. |
test:unit failure attribution
The single failing file is tests/unit/ci-artifact-contract.test.ts. All 19 failures come from
child-process, cgroup, and filesystem-permission behavior of the sandboxed execution
environment, not from adapter code. Verbatim causes recorded from the run log:
Error: ENOENT: no such file or directory, open '/proc/1325422/task/1325422/children'
Error: provider output did not reach expected content: /tmp/ci-provider-upload-J9hxXD/provider-evidence/untrusted/vulnerability-report.json
Error: provider scope survived completion: ca-provider-vulnerability-1326812-f4869853ef09ea2c2c95cd01.scope
Error: EACCES: permission denied, open '/tmp/ci-captured-archive-OWTs7M/candidate.tar.gz'
Error: Test timed out in 10000ms.
AssertionError: expected 5714 to be less than 5000
AssertionError: expected [] to deeply equal ArrayContaining{…}
This matches the environment note already recorded in the review index. It is not converted to an adapter failure and it is not treated as green. Every adapter task below must keep the adapter-focused suites green and must not increase this file's failure count.
Finding ledger
Activation records whether the finding is reachable on the current template execution path.
Rollout state starts at NOT_STARTED; documented-unimplemented items start at
PROMOTION_BLOCKED and are never labelled DEFECT.
Network and state (docs/reviews/adapters/01-network-and-state.md)
| ID | Activation | Red test command | Fix commit/PR | Rollout state | Rollback trigger | Evidence |
|---|---|---|---|---|---|---|
| N-01 | Live V3 path | corepack pnpm exec vitest run tests/integration/http-execution-v3-observability.test.ts |
fix: restore V3 HTTP observability |
FIXED_NOT_RELEASED |
diagnostics/telemetry producer gate regression | Red 5/5 failed → green 5/5; check:diagnostics PASS (8 diagnostics, 5 telemetry producers); check:types PASS; check:architecture PASS |
| N-02 | Live V3 path | corepack pnpm exec vitest run tests/integration/http-execution-v3-auth-profile.test.ts |
fix: enforce installed HTTP auth profiles |
FIXED_NOT_RELEASED |
authenticated request 4xx spike after profile enforcement | Red suite failed to load (installRestAuthProfileRegistry absent) → green 7/7; check:types PASS; check:architecture PASS; lint PASS; unit+integration+features 1560 passed with only the pre-existing environmental ci-artifact-contract failures |
| N-03 | Live V3 path | corepack pnpm exec vitest run tests/unit/http-execution-v3.test.ts -t "retry-time fence" |
fix: preserve command effect certainty across retries |
FIXED_NOT_RELEASED |
command effect verdict regression | Red reproduced SCOPE_FENCED with NOT_STARTED after one dispatched attempt → green MAYBE_APPLIED; lattice table 9/9; check:types PASS; lint PASS |
| N-04 | Live composition teardown | corepack pnpm exec vitest run tests/unit/telemetry.test.ts tests/unit/runtime-adapters.test.ts |
fix: terminate telemetry work on disposal |
FIXED_NOT_RELEASED |
telemetry delivery loss after teardown change | Red 10 failed (5 lifecycle + 5 capacity) → green 34/34; check:diagnostics PASS; check:types PASS; check:architecture PASS; lint PASS |
| N-05 | Rollout blocker (sidecar not composed) | corepack pnpm exec vitest run tests/unit/conditional-validator-store.test.ts |
fix: harden bounded state sidecars |
FIXED_NOT_RELEASED |
persisted validator key incompatibility | Red collision case (two valid bindings sharing one delimiter-joined key) → green; key is now a bounded validated tuple encoded with JSON.stringify |
| N-06 | Legacy V2 rollback seam | corepack pnpm exec vitest run tests/integration/http-client.test.ts |
fix: harden the legacy HTTP rollback path |
FIXED_NOT_RELEASED |
legacy keyed command rejection spike | Red 4 invalid-key cases → green; rejection happens before credentials and fetch (0 credential calls, 0 fetches) |
| N-07 | Legacy V2 rollback seam | corepack pnpm exec vitest run tests/integration/http-client.test.ts tests/integration/auth-recovery.test.ts |
fix: harden the legacy HTTP rollback path |
FIXED_NOT_RELEASED |
legacy credential timeout regression | Red never-settling owner → green; credential wait races the existing attempt controller so no extra timer is added; ownership maps to REQUEST_TIMEOUT / REQUEST_ABORTED / AUTH_INTEGRATION_FAILURE with zero fetches |
| N-08 | Legacy V2 rollback seam | corepack pnpm exec vitest run tests/unit/bounded-json-compatibility.test.ts |
fix: harden the legacy HTTP rollback path |
FIXED_NOT_RELEASED |
legacy JSON failure-code drift | Green 7/7 including throwing cancel/releaseLock; readBoundedJson now delegates to bounded-body-reader with the legacy codes preserved |
| N-09 | Live cross-context host | corepack pnpm exec vitest run tests/unit/cross-tab-invalidation.test.ts |
fix: harden bounded state sidecars |
FIXED_NOT_RELEASED |
cross-tab invalidation drop | Red foreign-area pulse accepted → green 13/13; localStorage captured once and StorageEvent.storageArea compared by object identity; pulse key registered as CACHE_INVALIDATION_PULSE; check:registries PASS |
| N-10 | Cursor runtime AVAILABLE_NOT_COMPOSED |
corepack pnpm exec vitest run tests/unit/cursor-pagination-runtime.test.ts |
fix: harden bounded state sidecars |
FIXED_NOT_RELEASED |
pagination abort semantics change | Red never-settling loader → green PAGINATION_ABORTED with the late page ignored |
| N-11 | Live composition | corepack pnpm exec vitest run tests/unit/telemetry.test.ts -t capacity |
fix: terminate telemetry work on disposal |
FIXED_NOT_RELEASED |
capacity rejection on valid composition | Red 5/5 capacity cases → green; ceilings documented in VD-07 §7-4 |
Storage and browser files (docs/reviews/adapters/03-storage-and-browser-files.md)
| ID | Activation | Red test command | Fix commit/PR | Rollout state | Rollback trigger | Evidence |
|---|---|---|---|---|---|---|
| STO-01 | OPFS not composed in template; Critical for any product writer | corepack pnpm exec vitest run tests/unit/opfs-byte-store.test.ts tests/unit/opfs-worker-runtime.test.ts tests/unit/indexeddb-opfs-journal.test.ts |
fix: preserve OPFS recovery authority during cleanup |
FIXED_NOT_RELEASED |
OPFS reconcile backlog or journal growth | Red 4 new saga cases → green 25/25 across the three OPFS suites; check:types PASS (incl. web-worker); check:browser-file-storage-boundaries PASS; lint PASS; test:unit 1511 passed with only the pre-existing environmental ci-artifact-contract failures |
| STO-02 | Browser file runtime not composed | corepack pnpm exec vitest run tests/unit/browser-file-download.test.ts |
fix: execute canonical browser download targets |
FIXED_NOT_RELEASED |
download navigation blocked by canonical target | Red 2 failed (raw relative href handed to host) → green 17/17 |
| STO-03 | Public cache not composed | corepack pnpm exec vitest run tests/unit/public-response-cache.test.ts |
fix: make public cache staging repairable |
FIXED_NOT_RELEASED |
composition rejection of an existing policy | Red 4 cases across STO-03..05 → green 21/21; check:types PASS; check:browser-file-storage-boundaries PASS; lint PASS |
| STO-04 | Public cache not composed | corepack pnpm exec vitest run tests/unit/public-response-cache.test.ts |
fix: make public cache staging repairable |
FIXED_NOT_RELEASED |
restage loop or bandwidth spike | — |
| STO-05 | Public cache not composed | corepack pnpm exec vitest run tests/unit/public-response-cache.test.ts |
fix: make public cache staging repairable |
FIXED_NOT_RELEASED |
activation permitted without required capability | — |
| STO-06 | IndexedDB maintenance | corepack pnpm exec vitest run tests/unit/indexeddb-maintenance.test.ts |
— | NOT_STARTED |
migration checkpoint stall | — |
| STO-07 | OPFS worker protocol | corepack pnpm exec vitest run tests/unit/opfs-worker-runtime.test.ts |
— | NOT_STARTED |
page/worker INCOMPATIBLE spike |
— |
| STO-08 | Hypothesis; browser characterization required | corepack pnpm exec playwright test --config playwright.capabilities.config.ts tests/browser-capabilities/browser-files.spec.ts |
none (source unchanged) | UNVERIFIED |
n/a until characterized | chromium 2/2 PASS; webkit could not launch (libevent-2.1-7t64, libavif16 missing — environmental). The existing spec does not exercise Window.showOpenFilePicker/showSaveFilePicker, which need a user gesture and a native dialog, so the receiver-binding hypothesis is neither reproduced nor refuted. No SystemPickerHost was introduced: the plan forbids implementing an uncharacterized hypothesis as a defect. |
| GAP-01 | Documented unimplemented (VD-15) | promotion evidence, not a red test | — | PROMOTION_BLOCKED |
n/a | — |
| GAP-02 | Documented unimplemented (VD-15) | promotion evidence, not a red test | — | PROMOTION_BLOCKED |
n/a | — |
| GAP-03 | Documented unimplemented (VD-15) | promotion evidence, not a red test | — | PROMOTION_BLOCKED |
n/a | — |
Realtime and Browser RPC (docs/reviews/adapters/02-realtime-and-browser-rpc.md)
| ID | Activation | Red test command | Fix commit/PR | Rollout state | Rollback trigger | Evidence |
|---|---|---|---|---|---|---|
| R-01 | Browser RPC AVAILABLE_NOT_COMPOSED |
corepack pnpm exec vitest run tests/unit/browser-rpc/browser-rpc-runtime.test.ts |
fix: install bounded Browser RPC stream leases |
FIXED_NOT_RELEASED |
stream lease deadlock | Stream cleanup is bounded; the generator no longer waits indefinitely on a non-cooperative iterator.return() |
| R-02 | Realtime NOT_SELECTED |
corepack pnpm exec vitest run tests/unit/realtime/stream-coordinator.test.ts |
fix: retain realtime work through draining |
FIXED_NOT_RELEASED |
stream stuck in DRAINING |
Red never-settling effect and recovery → green 27/27; close() returns IDLE_TIMEOUT while a task is retained and success only after actual settlement |
| R-03 | Realtime NOT_SELECTED |
corepack pnpm exec vitest run tests/unit/realtime/live-poll-handoff-coordinator.test.ts |
fix: retain realtime work through draining |
FIXED_NOT_RELEASED |
retired-writer set growth | Red overflow fail-close then close() → green 11/11; retired writers are waited on and only removed once actually quiesced |
| R-04 | Browser RPC AVAILABLE_NOT_COMPOSED |
corepack pnpm exec vitest run tests/unit/browser-rpc/browser-rpc-contract.test.ts |
fix: install bounded Browser RPC stream leases |
FIXED_NOT_RELEASED |
binding install rejection | Red post-validation mutation, accessor and symbol cases → green 19/19; getters are never invoked |
| R-05 | WebSocket protocol codec | corepack pnpm exec vitest run tests/unit/realtime/websocket-protocol.test.ts |
fix: install bounded Browser RPC stream leases |
FIXED_NOT_RELEASED |
frame rejection regression | Red oversize frame allocated an encoder copy → green 8/8; byte counts match TextEncoder including lone surrogates |
| R-06 | Browser RPC AVAILABLE_NOT_COMPOSED |
corepack pnpm exec vitest run tests/unit/browser-rpc/browser-rpc-runtime.test.ts |
fix: install bounded Browser RPC stream leases |
FIXED_NOT_RELEASED |
closed-failure taxonomy drift | Clock and fence reads are canonicalised into the closed Result taxonomy with single-exit cleanup |
| R-07 | Promotion blocker | concrete transport conformance evidence | — | PROMOTION_BLOCKED |
n/a | — |
Browser transfer (docs/reviews/adapters/04-browser-transfer.md)
| ID | Activation | Red test command | Fix commit/PR | Rollout state | Rollback trigger | Evidence |
|---|---|---|---|---|---|---|
| BT-PRE-01 | Presigned AVAILABLE_NOT_COMPOSED |
corepack pnpm exec vitest run tests/unit/presigned-transfer.test.ts |
fix: lazy presigned download leases |
FIXED_NOT_RELEASED |
download lease leak | Red lazy-lease cases → green 29/29; open() performs no network I/O and close() is idempotent |
| BT-PRE-02 | Wire contract gap | corepack pnpm exec vitest run tests/unit/presigned-transfer.test.ts |
— | NOT_STARTED |
provider POLICY_REJECTED spike |
— |
| BT-PRE-03 | Presigned provider | corepack pnpm exec vitest run tests/unit/presigned-transfer.test.ts |
— | NOT_STARTED |
timeout not bounding fetch | — |
| BT-PRE-04 | Presigned vault | corepack pnpm exec vitest run tests/unit/presigned-transfer.test.ts |
— | NOT_STARTED |
issuer/consumer split break | — |
| BT-PRE-05 | Provider path decoding | corepack pnpm exec vitest run tests/unit/presigned-transfer.test.ts |
— | NOT_STARTED |
legitimate key rejection | — |
| BT-UP-01 | Resumable transport | corepack pnpm exec vitest run tests/unit/resumable-upload-fetch-transport.test.ts |
fix: harden resumable upload transport contracts |
FIXED_NOT_RELEASED |
signal facade rejection | isAbortSignal now requires removeEventListener and release cleanup is isolated |
| BT-UP-02 | Resumable transport | corepack pnpm exec vitest run tests/unit/resumable-upload-fetch-transport.test.ts |
— | NOT_STARTED |
clock injection break | — |
| BT-UP-03 | Resumable checkpoint store | corepack pnpm exec vitest run tests/unit/resumable-upload-checkpoint.test.ts |
fix: report unknown IndexedDB delete effects |
FIXED_NOT_RELEASED |
pending-delete registry growth | Red blocked-deadline case → green PENDING/UNKNOWN; a realm-scoped registry blocks recreating the partition |
| BT-UP-04 | Presigned part executor | corepack pnpm exec vitest run tests/unit/resumable-upload-checkpoint.test.ts |
fix: harden resumable upload transport contracts |
FIXED_NOT_RELEASED |
expiry check rejection | Non-finite and negative clocks return UNAVAILABLE/RESUME instead of bypassing expiry |
| BT-UP-05 | Refactor | corepack pnpm exec vitest run tests/unit/resumable-upload-runtime.test.ts |
— | NOT_STARTED |
characterization drift | — |
| BT-UP-06 | Refactor | corepack pnpm exec vitest run tests/unit/resumable-upload-runtime.test.ts |
— | NOT_STARTED |
drain not quiescent | — |
| BT-UP-07 | Documented gap (Web Locks matrix) | promotion evidence | — | PROMOTION_BLOCKED |
n/a | — |
| BT-IMG-01 | Type-contract change | corepack pnpm check:types:test fixture |
— | NOT_STARTED |
caller compile break | — |
| BT-IMG-02 | Image probe | corepack pnpm exec vitest run tests/unit/image-cdn-runtime.test.ts |
fix: parse Cache-Control with quote awareness |
FIXED_NOT_RELEASED |
Cache-Control parse rejection | Red unmatched-quote cases → green 25/25 |
| BT-IMG-03 | Refactor | corepack pnpm exec vitest run tests/unit/image-cdn-runtime.test.ts |
— | NOT_STARTED |
characterization drift | — |
| BT-IMG-04 | Documented gap (descriptor provider) | promotion evidence | — | PROMOTION_BLOCKED |
n/a | — |
| BT-X-01 | Shared abort mechanics | corepack pnpm exec vitest run tests/unit/abortable-operation.test.ts |
fix: share abort and deadline mechanics |
FIXED_NOT_RELEASED |
late-result compensation regression | Golden suite 8/8: first terminal owner, idempotent close, throwing scheduler, observed late rejection, late-handle compensation |
Service Worker and Web Push (docs/reviews/adapters/05-service-worker-and-web-push.md)
| ID | Activation | Red test command | Fix commit/PR | Rollout state | Rollback trigger | Evidence |
|---|---|---|---|---|---|---|
| SW-URL-01 | Composed when capability selected | corepack pnpm exec vitest run tests/unit/service-worker-runtime.test.ts |
fix: make Service Worker cache and removal outcomes truthful |
FIXED_NOT_RELEASED |
static asset cache miss rate | Red generator-shaped root-relative asset vs absolute Request URL → green; manifest URLs canonicalized once against the registration scope |
| SW-01 | Composed when capability selected | corepack pnpm exec vitest run tests/unit/service-worker-runtime.test.ts |
fix: make Service Worker cache and removal outcomes truthful |
FIXED_NOT_RELEASED |
stale response served | Red previous-cache hit → green network fallback; only the current release cache is opened, matched and deleted from |
| SW-02 | Composed when capability selected | corepack pnpm exec vitest run tests/unit/service-worker-runtime.test.ts |
fix: make Service Worker cache and removal outcomes truthful |
FIXED_NOT_RELEASED |
foreign cache deletion | Red prefix deletion of ca-static-v1-not-owned and longer suffixes → green exact isOwnedStaticCacheName only |
| SW-03 | Composed when capability selected | corepack pnpm exec vitest run tests/unit/service-worker-runtime.test.ts |
fix: make Service Worker cache and removal outcomes truthful |
FIXED_NOT_RELEASED |
false removal success | Red unregister() === false reported as UNREGISTERED → green FAILED |
| SW-04 | Composed when capability selected | corepack pnpm exec vitest run tests/unit/service-worker-runtime.test.ts |
fix: make Service Worker cache and removal outcomes truthful |
FIXED_NOT_RELEASED |
removal outcome misreport | Red removal modes always DISABLED → green outcome matrix (ABSENT/UNREGISTERED/PURGED→DISABLED, OWNERSHIP_MISMATCH→INCOMPATIBLE, FAILED→FAILED) |
| SW-05 | Build gate | corepack pnpm exec vitest run tests/unit/service-worker-build-input.test.ts |
fix: make Service Worker cache and removal outcomes truthful |
FIXED_NOT_RELEASED |
build admission rejection | Red tamper table (stale digest, byte length, cross-origin URL, dot segment, extension mismatch, unknown field, duplicate URL) → green; build gate decodes through the shared codec and recomputes the canonical digest |
| SW-06 | Composed when capability selected | corepack pnpm exec vitest run tests/unit/service-worker-runtime.test.ts |
— | NOT_STARTED |
activation handshake failure | — |
| SW-07 | Composed when capability selected | corepack pnpm exec vitest run tests/unit/service-worker-runtime.test.ts |
— | NOT_STARTED |
activation blocked with zero clients | — |
| SW-08 | Composed when capability selected | corepack pnpm exec vitest run tests/unit/service-worker-runtime.test.ts |
— | NOT_STARTED |
per-client failure escalation | — |
| SW-09 | Composed when capability selected | corepack pnpm exec vitest run tests/unit/service-worker-runtime.test.ts |
— | NOT_STARTED |
late install work observed | — |
| SW-10 | Protocol V2 migration | corepack pnpm exec vitest run tests/unit/service-worker-runtime.test.ts |
— | NOT_STARTED |
V1/V2 mismatch fail-close | — |
| WP-01 | Web Push NOT_SELECTED |
corepack pnpm exec vitest run tests/unit/web-push-fence-store.test.ts |
— | NOT_STARTED |
CAS receipt rejection | — |
| WP-02 | Web Push NOT_SELECTED |
corepack pnpm exec vitest run tests/unit/web-push-fence-store.test.ts |
— | NOT_STARTED |
RECONCILIATION_REQUIRED backlog |
— |
| WP-03 | Web Push NOT_SELECTED |
corepack pnpm exec vitest run tests/unit/web-push-subscription-adapter.test.ts |
— | NOT_STARTED |
backend receipt mismatch | — |
| WP-04 | Web Push NOT_SELECTED |
corepack pnpm exec vitest run tests/unit/web-push-subscription-adapter.test.ts |
— | NOT_STARTED |
reconcile loop | — |
| WP-05 | Web Push NOT_SELECTED |
corepack pnpm exec vitest run tests/unit/web-push-subscription-adapter.test.ts |
— | NOT_STARTED |
pre-abort observation drift | — |
| WP-06 | Web Push NOT_SELECTED |
corepack pnpm exec vitest run tests/unit/web-push-worker-runtime.test.ts |
— | NOT_STARTED |
truncation reported degraded | — |
| WP-07 | Web Push NOT_SELECTED |
corepack pnpm exec vitest run tests/unit/web-push-worker-runtime.test.ts |
— | NOT_STARTED |
late native effect certainty | — |
Rules for updating this ledger
- A row moves out of
NOT_STARTEDonly with a linked red test, its green run, and the commit id. PROMOTION_BLOCKEDrows never becomeDEFECT; they close through an authorized product selection change with the browser/provider evidence named in the plan.- Environmental gate failures are copied verbatim and are never claimed as green.