6.6 KiB
Executable File
title, date, tags
| title | date | tags | |||
|---|---|---|---|---|---|
| CPM — metrics, causes and mitigations | 2026-10-16 |
|
CPM: metrics, causes and mitigations
Updated 16 October 2026. Internal metrics; keep these figures out of public PRs. cpm-e2e-init is the local test/fix worktree referenced here.
What the metrics mean
The monitor reports failure when no matching native dashboard refresh arrives within 4 seconds of navigation completion. A second qualifying timeout marks the episode stuck and triggers M4 extension reload. Neither timeout nor recovery proves delivery of initResp to the page: tests can receive it while dashboard delivery fails.
Daily pixels count installation-days per event/reason, not distinct users or episodes. Independently deduplicated failure/recovery totals cannot establish transition or recovery success rates. Keep .count separate from .daily.
Distribution
Latest received production cut: 12–14 October, iOS 7.240+ / macOS 1.210+. Figures below always use iOS / macOS order.
- Initial failures: 3,273,025 / 119,950; stuck: 511,660 / 40,842.
- Recovery without reload: 1,135,477 / 30,738 (34.7% / 25.6% of initial-failure daily totals).
- Recovery after M4: 293,557 / 21,865 (57.4% / 53.5% of stuck daily totals); reload-failed reports: 140,921 / 17,796 (27.5% / 43.6%). These are ratios of event totals, not episode outcomes.
Mutually exclusive snapshot cohorts, in classification priority order. Each pair shows share of initial failures → share of stuck:
- Error 6: 6.1% → 21.5% / 1.0% → 1.9%.
- No background view: 48.1% → 10.9% / 3.3% → 1.8%.
- Tab detached: 0.03% → 0.05% / 6.2% → 8.9%.
- Network process replaced: 16.8% → 39.7% / 13.6% → 26.6%.
- Recent wake: 7.9% → 9.5% / 32.5% → 32.2%.
- Recent context load: 15.7% → 6.0% / 20.0% → 6.4%.
- Other: 5.3% → 12.5% / 23.4% → 22.2%.
These classify observed state, not causes. Network replacement and error 6 are more prominent in stuck; missing-view and recent-load cases are less prominent.
Earlier 5 October post-release cut: initial failures 6,624 / 1,377, stuck 1,440 / 487, first post-reload timeouts 670 / 232. It established the same wake/load distinction; its different window and filters must not be combined with the newer totals. cpm-web-extension-public-attribution-2026-10-05 · cpm-web-extension-data-analysis-summary-2026-10-08
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_restartedcompares against context load, not the latest view. Addnetwork_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
loadBackgroundContentonce 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
webExtensionsflag 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.
Open PRs and local validation
Last verified open: 15 October, 17:26 UTC. Live GitHub access was declined in this pass; current state is unverified.
- #7376: readiness/recovery telemetry; #7384: healthy readiness baselines; #7385 + extension #3727: native/JS init progress.
- #7378: repro harness → #7379: Fix A → #7381: Fix B. Last check: #7384/#7385 failed Danger; #7381 failed Non-Sandbox. B's corrective commit was local only.
- The newer PR0 episode-report proposal replaces separate failure/recovery events with one terminal episode report; it supersedes the older reporting design, not the historical measurements.
Local cpm-e2e-init, 16 October: P1/P2 candidates remain uncommitted. 22 unique app methods passed across separate runs; two deliberate disabled-fix controls failed. Package validation: 806 tests, 14 skipped, zero failures. Tests use real app/WebKit paths with an instrumented bundle and imposed faults; they do not identify every production cause. P3 remains unreproduced; app P5 establishes one lost navigation. No shipped-effect claim.
Detailed evidence and final validation: cpm-status-2026-10-15 · cpm-web-extension-code-guide-2026-10-09.