[2026-10-15] eagle: work/projects/cpm-background-graveyard-experiment-definition.md work/projects/cpm-extension-health-pixels-privacy-triage.md work/projects/cpm-m3-telemetry-privacy-triage.md work/projects/cpm-readiness-telemetry-tech-design-2026-10-15.md work/projects/cpm-service-worker-architecture-and-diagnostics.md work/projects/cpm-status-2026-10-15.md work/projects/cpm-telemetry-data-requirements-2026-10-15.md work/projects/cpm-web-extension-breakage-findings.md work/projects/cpm-web-extension-breakage-session-summary-2026-10-07.md work/projects/cpm-web-extension-breakage-validation.md
This commit is contained in:
1 parent
f53943f88f
commit
e4e692b3d1
15 files changed
+312
-18
No files matched your search
@@ -1,5 +1,16 @@
|
||||
# CPM Service Worker — architecture, diagnostics, failure gaps
|
||||
|
||||
> **Follow-up evidence — 2026-10-15.** Current status, test outcomes and scope: [[cpm-status-2026-10-15]] (§10–12); current worktree map: [[cpm-web-extension-code-guide-2026-10-09]] (§0). The source audit below remains the September 25 baseline; its bundle version and worktree/milestone readiness are historical.
|
||||
>
|
||||
> - The October harness uses bundled extension **2026.9.29**, real production manager/coordinator/monitor/recorder/native handler and system WebKit on macOS 26.7.1. A temporary extracted bundle copy carries trace and DOM initResp marks; the production zip is unchanged. It does not run the entire browser app/AppKit.
|
||||
> - Browser window lifecycle is now tied to a measured WebKit side effect: the closing window still exposes a shared pinned tab, so didCloseWindow internally forgets it despite the browser filtering explicit didCloseTab calls. Subsequent messages fail tab resolution before wake; exact P5/tab=false/stuck is reproduced. This does not explain P5/tab=true or iOS.
|
||||
> - Main webExtensions flag cycling through the production handler recreates the controller and produces P6 on the old view. Actual production flag transitions remain unproven; repeated true and embedded-only cycling preserve controller identity. Embedded reinstall can still lose its first message before ready (known A); the healthy binding control explicitly waits for background readiness.
|
||||
> - The no-listener-from-first-start experiment produces P5 with healthy-looking tab flags, but only under test-only suppression. One lost registration on a later wake recovered after restoring the script. The current bundled bootstrap creates MessageRouter and its runtime listener synchronously before its trailing Promise.all diagnostics; failure of those later async diagnostics alone is not evidence that listener registration was skipped.
|
||||
> - Two slow 35-second documents receive initResp; report/eval at finish wake the background again. Suppressing dashboard delivery yields actual detector stuck despite page receipt, with a live background. Two 35-second **host main-actor** stalls delay failure snapshots but also leave a live view; this is not a background-worker busy loop or real iOS suspension.
|
||||
> - All 14 current P5/P6 methods have passing outcomes across separate runs; no single final 14-test run. Latest ordinary package: 478 XCTest / 28 opt-in skipped / 0 failures. Priorities involving real iOS lifecycle, stable-origin teardown, natural metadata loss, request cancellation and stale-document replies are not closed by these checks. Native `init_stage` and its JS counterpart remain open PRs (#7385 / privacy-extension#3727), not assumed shipped.
|
||||
|
||||
|
||||
|
||||
> **2026-09-25 · source audit, not a new device reproduction.** Start with §4: the five validation priorities.
|
||||
> Current assessment supersedes the architecture/diagnostics assumptions in [[cpm-web-extension-breakage-findings]]. Milestone status remains in [[cpm-web-extension-breakage-validation]].
|
||||
>
|
||||
@@ -7,7 +18,7 @@
|
||||
|
||||
## 1. What the Service Worker is in CPM
|
||||
|
||||
The bundled extension is MV3, version **2026.9.2**. Its classic service worker is `public/js/background-embedded.js`; `public/js/content-scripts/cpm.js` runs at document start in an isolated world in all matching frames. A background worker is shared by the tabs using that extension context; it is not one worker per tab and not necessarily one across every profile/data store.
|
||||
The bundle audited on September 25 was MV3, version **2026.9.2**; the October 15 harness uses **2026.9.29**. Its classic service worker is `public/js/background-embedded.js`; `public/js/content-scripts/cpm.js` runs at document start in an isolated world in all matching frames. A background worker is shared by the tabs using that extension context; it is not one worker per tab and not necessarily one across every profile/data store.
|
||||
|
||||
It is the extension's background JavaScript environment: message router, native-settings/configuration access, CPM rule selection and replies. It has a worker global, not the page DOM. CPM uses extension messaging—not the website Service Worker fetch/offline-cache path.
|
||||
|
||||
@@ -170,4 +181,4 @@ App evidence is in `SharedPackages/WebExtensions/Sources/WebExtensions/`:
|
||||
|
||||
Additional source: [extension workers are not persisted](https://github.com/WebKit/WebKit/blob/0c7e7ad97b9c50e549387914d31ecc2908ae0171/Source/WebCore/workers/service/server/SWServerWorker.cpp#L561).
|
||||
|
||||
**Validation status:** source tracing and bundle/Swift contract comparison completed. No new device reproduction, build, unit test or app-code change was performed for this documentation audit.
|
||||
**Validation status of the September 25 audit:** source tracing and bundle/Swift contract comparison completed. No new device reproduction, build, unit test or app-code change was performed for this documentation audit.
|
||||
Reference in new issue
Block a user