[2026-10-30] eagle: work/projects/CPM Breakage Testing Steps.md work/projects/cpm-post-release-analysis-2026-10-27.md work/projects/cpm-status-2026-10-15.md work/projects/cpm-web-extension-breakage-findings.md work/projects/cpm-web-extension-breakage-validation.md work/projects/cpm-web-extension-code-guide-2026-10-09.md

This commit is contained in:
Alexey Martemyanov committed 2026-10-30 16:59:25 +06:00
1 parent 449c867f90
commit 203852d638
6 files changed
+98 -3

No files matched your search

@@ -9,6 +9,20 @@ updated: '2026-10-30'
---
# CPM: first post-release data, 26 October 2026
## Error-6 restart — 30 October 2026
[PR #7730](https://github.com/duckduckgo/apple-browsers/pull/7730) is **OPEN, non-draft, MERGEABLE**, head **`cf668e2938`**, with **privacy review required**. The closed draft described under 28 October is historical. This PR is not merged or shipped; this update does not add a new production data cut.
The implementation restarts only the current embedded context whose **original failed background view is still retained at execution**. Released views keep the existing P2 retry; WebKit's replacement view is left alone. Deferred errors resume after foreground/wake. The latest pending error survives the 60-second cooldown and is retried after expiry; expiry in background waits for foreground. Equal historical errors are deduplicated, with history reset for a newly created background view so delayed clear/add notifications do not hide a new equal failure.
A dedicated `web_extension_cpm_background_load_restart` pixel now exists, dailyAndCount on both platforms with no macOS name suffix and bounded `outcome`. Applying the restart, background readiness and an attributable dashboard response are separate stages. Terminal outcomes distinguish measured no-response at the five-active-minute deadline, unobserved, superseded, reload failure and reload timeout. A new embedded identifier loaded by upgrade supersedes the old restart observation; its response cannot claim that the old restart recovered messaging. Count rows are required for outcome rates; daily deduplication usually keeps restart_started.
Local final validation on `cf668e2938`: **1,064 production package tests passed**, strict lint and both platforms' pixel validators passed. Final review added **8 temporary edge-case probes: 1,072 tests passed**, no important findings; the probes were removed. Permanent regressions remain in normal PR CI. Exact-head CI was not re-read for this documentation update.
The separate review harness is synchronized at `5348c7254e` and adds only 17 Swift fixture/test files plus its guide. The last actual same-binary macOS OFF/ON was run on **`d1a2e1de65`**: OFF functionally failed with real error 6 and a retained failed view; ON restored the original document's native response and real page initResp, with two later idle/wake cycles healthy. This is controlled worker-start fault injection, not a natural production trigger or physical iOS suspend/wake validation. Later queue/cooldown/attribution changes have regression-test evidence, not a new real-WebKit OFF/ON result.
Full behavior, flags, outcomes and evidence: [[cpm-status-2026-10-15#Error-6 restart — PR 7730]]. Reviewer commands: [[CPM Breakage Testing Steps#Error-6 restart — PR 7730 (30 October 2026)]]. Historical production percentages below retain their original dates/denominators; the PR does not establish its production causal share or post-rollout effect.
Internal metrics; keep these figures out of public PRs. Previous analysis: [[cpm-metrics-causes-and-mitigations-2026-10-16]], [[cpm-status-2026-10-15]] (§3–5, 12–14 October cut).
## Upgrade-before-load — 30 October 2026
@@ -375,7 +389,9 @@ Internal metrics; keep these figures out of public PRs. Data: ClickHouse via `~/
The background page loads with `navigator.serviceWorker.register(...)`; its rejection carries the WebKit error text (`Error: <message>`), obtainable with a `WKUserScript` and `WKScriptMessageHandler` on the background web view delivered by `didCreateBackgroundWebView` (before the page loads). Message only, no file or line. The extension's own `extensionException` messages are not handled by the app (unknown method). Verified once with an injected exception.
### Proposed fix: restart the context when the failed view is retained (PR #7730, closed)
### Historical draft — 28 October 2026: retained-view restart
> Superseded by [[cpm-post-release-analysis-2026-10-27#Error-6 restart — 30 October 2026]]. PR #7730 is now OPEN at `cf668e2938`; the following closed/no-new-pixel/three-test statements describe the 28 October draft, not the current implementation.
- **Behavior.** On error 6 (current context, recovery flag on, app in the foreground, no M4 in progress, 60 s cooldown) the manager checks `WKWebExtensionContext._backgroundWebView`. If the failed view is still alive it reloads the embedded extension at once (new reload trigger `cpmBackgroundLoadFailure`) and loads the background. If the view was released it keeps the plain P2 retry, which preserves the failed document's init.
- **Why.** WebKit's `loadBackgroundWebViewIfNeeded` returns early while the view exists (`m_backgroundWebView` set), and after a failed `_loadServiceWorker` WebKit records error 6 without an underlying error and does not unload the view. The retry therefore cannot replace it.
@@ -391,7 +407,7 @@ The background page loads with `navigator.serviceWorker.register(...)`; its reje
- Why 172 permanent episodes of the `interruption` family do not recover, when 2,797 identical-looking ones do.
- What makes a start hang longer than 30 s (candidates from earlier notes: origin-change data migration, host main thread stall, process throttling), and why that survives M4.
- How often the failed view is retained.
- Pixel for the restart (none exists yet).
- Historical 28 Oct gap, now implemented in PR #7730: `web_extension_cpm_background_load_restart` with bounded outcomes. Privacy review and release/rollout are separate gates; see the 30 October update above.
## Idle wake investigation — 28 October 2026