diff --git a/work/projects/cpm-metrics-causes-and-mitigations-2026-10-16.md b/work/projects/cpm-metrics-causes-and-mitigations-2026-10-16.md index 017e851d..8ce55062 100755 --- a/work/projects/cpm-metrics-causes-and-mitigations-2026-10-16.md +++ b/work/projects/cpm-metrics-causes-and-mitigations-2026-10-16.md @@ -40,14 +40,16 @@ Earlier **5 October post-release** cut: initial failures **6,624 / 1,377**, stuc ## Causes and suggested mitigations -- **Network crash:** reproduced across tabs/windows; a surviving background view can retain a dead worker after Network-process replacement. Fix B restarts the background. Production attribution remains incomplete: `network_restarted` compares against context load, not the latest view. Add `network_replaced_since_view`; the older analysis supports at most 20–45% of healthy-looking stuck reports, not the whole cohort. -- **P1, slow idle wake:** an imposed startup delay reproduces timeout followed by a late answer; natural production slowness remains unexplained. Local mitigation prepares background before navigation, with a shared, cancellable **5-second maximum wait**. It passed with an 8-second worker delay; longer delays remain possible. -- **P2, error 6:** controlled macOS suspension reproduces WebKit's roughly 30-second background-load timeout. The main iOS chains remain unproven. Local mitigation retries `loadBackgroundContent` once on the current context, with cooldown and recovery guards. Same-document dashboard **and page initResp** recovery passed twice. Full-context replacement was rejected after repeat page-response loss. Foreground-resume recovery remains untested. -- **P3, loaded context without view:** startup dominates on iOS. Base-URL cleanup can delay startup, but the full P3 failure remains unreproduced, including the 20,000-resource cache test. Stable extension base URL is an unfinished candidate. -- **P4, first mid-session load:** early init loss is reproduced; Fix A waits for first background readiness. Its signature covers only **3.9% of iOS initial failures and 0.9% of stuck** (129k → 4.6k), and can include reloads. -- **P5, tab registration lost:** closing a window containing a shared pinned tab makes WebKit unregister the surviving tab. Correct window/tab lifecycle reporting is the mitigation to develop. The mechanism covers macOS `tab_in_context=false`; other P5 cases remain unexplained. Separate 14 October selection: **68 of 499** macOS P5 reports have that flag; the earlier 494-report selection used different filters. -- **P6, controller mismatch:** a main `webExtensions` flag cycle creates a new manager while existing web views retain the old controller. Recreate/rebind affected views when replacing the manager; context reload alone cannot repair this. The conditional mechanism is reproduced, but its occurrence in production is unconfirmed. Selected macOS tails: **627 + 235** reports. -- **Other:** no established cause. Readiness timing, init progress and healthy-load baselines are needed before selecting a mitigation. +Percentages below are shares of all initial-failure / stuck daily reports in the 12–14 October cut. Snapshot cohorts are proxies for causes; P5/P6 selections use separate denominators. + +- **Network crash:** replacement cohort — **iOS init 16.8%, stuck 39.7%; macOS init 13.6%, stuck 26.6%**. reproduced across tabs/windows; a surviving background view can retain a dead worker after Network-process replacement. Fix B restarts the background. Production attribution remains incomplete: `network_restarted` compares against context load, not the latest view. Add `network_replaced_since_view`; the older analysis supports at most 20–45% of healthy-looking stuck reports, not the whole cohort. +- **P1, slow idle wake:** recent-wake cohort — **iOS init 7.9%, stuck 9.5%; macOS init 32.5%, stuck 32.2%**; excludes older wake tails. an imposed startup delay reproduces timeout followed by a late answer; natural production slowness remains unexplained. Local mitigation prepares background before navigation, with a shared, cancellable **5-second maximum wait**. It passed with an 8-second worker delay; longer delays remain possible. +- **P2, error 6:** error-6 cohort — **iOS init 6.1%, stuck 21.5%; macOS init 1.0%, stuck 1.9%**. controlled macOS suspension reproduces WebKit's roughly 30-second background-load timeout. The main iOS chains remain unproven. Local mitigation retries `loadBackgroundContent` once on the current context, with cooldown and recovery guards. Same-document dashboard **and page initResp** recovery passed twice. Full-context replacement was rejected after repeat page-response loss. Foreground-resume recovery remains untested. +- **P3, loaded context without view:** no-view cohort — **iOS init 48.1%, stuck 10.9%; macOS init 3.3%, stuck 1.8%**. startup dominates on iOS. Base-URL cleanup can delay startup, but the full P3 failure remains unreproduced, including the 20,000-resource cache test. Stable extension base URL is an unfinished candidate. +- **P4, first mid-session load:** Fix A signature — **iOS init 3.9%, stuck 0.9%**. Broader recent-load cohort: **iOS init 15.7%, stuck 6.0%; macOS init 20.0%, stuck 6.4%**. early init loss is reproduced; Fix A waits for first background readiness. The narrower signature is 129k → 4.6k iOS reports and can include reloads. +- **P5, tab registration lost:** separate shares of all init/stuck reports are unavailable. closing a window containing a shared pinned tab makes WebKit unregister the surviving tab. Correct window/tab lifecycle reporting is the mitigation to develop. The mechanism covers macOS `tab_in_context=false`; other P5 cases remain unexplained. Separate 14 October selection: **13.6% (68 of 499)** of selected macOS P5 stuck reports have that flag; the earlier 494-report selection used different filters. +- **P6, controller mismatch:** broader detached-tab cohort — **iOS init 0.03%, stuck 0.05%; macOS init 6.2%, stuck 8.9%**. P6-only init/stuck shares are unavailable. a main `webExtensions` flag cycle creates a new manager while existing web views retain the old controller. Recreate/rebind affected views when replacing the manager; context reload alone cannot repair this. The conditional mechanism is reproduced, but its occurrence in production is unconfirmed. Selected macOS tails: **627 + 235** reports. +- **Other:** **iOS init 5.3%, stuck 12.5%; macOS init 23.4%, stuck 22.2%**. no established cause. Readiness timing, init progress and healthy-load baselines are needed before selecting a mitigation. ## Open PRs and local validation