Wave 4 Pass 4.A architecture: @serwist/next 9.5.10 + Workbox-style str…
Decision
Wave 4 Pass 4.A architecture: @serwist/next 9.5.10 + Workbox-style strategies + idb-backed IndexedDB queue + caller-injected drain action + auth-proxy public allowlist for PWA assets + planner-review conflict policy (no auto-overwrite). Production build switched to next build —webpack; dev keeps Turbopack via disable: NODE_ENV===‘development’. Hardened during premortem: progress form try/catches Server Action throw to fall through to enqueue (network-up-but-broken case); ExpirationPlugin bounds runtime API cache to 24h × 100 entries (prevents long-term rot).
Rationale
Premortem (ST session dfdee8e0) surfaced two real failure modes that the test suite + smoke pass missed: (1) Server Action throws at fetch layer before wrap() catches when navigator.onLine returns true on broken connectivity — fixed by try/catch fallthrough to enqueue. (2) NetworkFirst cache had cacheWillUpdate but no expiration — fixed via ExpirationPlugin (24h max age, 100 entries cap). Both align with feedback_world_class_zero_compromise.md: no “we’ll fix it in pilot” deferrals when the diff is fresh. Stack pivot from next-pwa to @serwist/next is reversible (npm dep swap + sw.ts rewrite). Conflict policy is intentionally strict (no auto-overwrite) to preserve audit-log integrity per ADR-0003 + ADR-0005. Build mode switch to webpack is a documented one-liner in package.json — reversible if Serwist adds Turbopack support later.
Alternatives Rejected
Outcome
Pending
Related
- wave-4-pass-4a-architecture-canonical-re-record-serwistnext
- r-plan-layer-2-architecture-locked-2026-04-28-nextjs-16-pnpm
- sequential-thinking
- wave-4-pass-4a-residual-risk-register-accepted-3-risks-ident
- r-plan-wave-0-shipped-2026-04-28-repo-arj999r-plan-private-l
- adr-0006-cloudflare-r2-for-r-plan-pass-4c-photo-storage-aws