From 44aa4afb250ccdeef8eb14a577837114d7ccafd7 Mon Sep 17 00:00:00 2001 From: Alexey Martemyanov Date: Thu, 10 Sep 2026 11:25:19 +0600 Subject: [PATCH] [2026-09-10] eagle: work/projects/cpm-web-extension-breakage-findings.md --- work/projects/cpm-web-extension-breakage-findings.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/work/projects/cpm-web-extension-breakage-findings.md b/work/projects/cpm-web-extension-breakage-findings.md index 26dda6cd..99911ca4 100644 --- a/work/projects/cpm-web-extension-breakage-findings.md +++ b/work/projects/cpm-web-extension-breakage-findings.md @@ -1208,6 +1208,10 @@ Chain, all WebKit, all confirmed by the log: Symptom match: all tabs, new tabs too, survives reload, banners not handled, dashboard `waiting`, Fire fixes, no visible error in the app. Pixel signature: `extension_context_errors=background_failed_to_load` + `background_view_alive=true` + `background_view_create_count` ≥ 2 + `network_process_restarted=false`. +**Why fetches do not matter / what keeps it dead.** The background is woken only by `runtime.sendMessage` from a *new document* (cpm.js at `document_start`, `all_frames: true`, `match_origin_as_fallback: true`) and by the one-shot `cpm-summary` alarm; the healthy worker registers only `runtime.onMessage`, `runtime.onConnect`, `alarms.onAlarm`. Realistic sustained sources: ad-slot iframes refreshing every 15–30 s, embeds/chat widgets creating frames, `meta refresh`/`location.reload()` pages, the user's own navigation. Regimes: gaps < 30 s → the failed view is never unloaded at all (timer re-armed on every wake); 30–40 s → unload/retry loop that fails; > 40 s → self-heal. + +**Test page:** `cpm-ad-churn.html` in the repo root — privacy-test-pages autoconsent markup (`#privacy-test-page-cmp-test` / `#reject-all`, no reload guard) plus a fake ad iframe recreated every `?period=` s (default 10), each frame with its own fake CMP; per-frame ✅/⏳ table shows whether CPM handled it. Deploy to Eagle Pages: `sudo cp ~/DuckDuckGo/apple-browsers.git/cpm-breakage-pixel/cpm-ad-churn.html /Library/WebServer/Documents/` → `http://localhost/local-pages/cpm-ad-churn.html` (dashboard reads the directory live). Debug → Web Extensions now shows a disabled "CPM Background WebContent PID: …" item for the `kill -9`. + **Reproduction (DEBUG, 100 %):** "Print CPM Diagnostics Snapshot" → `kill -9 ` → reload any tab with a cookie banner. Log with `log stream --level debug --predicate '(subsystem == "com.apple.WebKit" AND category == "ServiceWorker") OR category == "Extensions" OR composedMessage CONTAINS "[CPM"'` and look for "creating a new service worker process" followed by "Created service worker N in process PID <≠ webProcessPID of the view>" and "Job N failed with error Script error."