[2026-10-16] eagle: personal/projects/archive/broker-before-main-deployment-2026-10-16.md personal/projects/balda/execution-broker.md work/projects/cpm-pr0-episode-telemetry-summary-2026-10-16.md
This commit is contained in:
1 parent
328e56026e
commit
f684e6a9cc
3 files changed
+180
-97
No files matched your search
@@ -8,41 +8,66 @@ tags:
|
||||
---
|
||||
# CPM PR0: one terminal report per failure episode
|
||||
|
||||
This describes the uncommitted replacement in `alex/cpm-telemetry-pr0`, based on `origin/main` (`874b465856ca`). It is a proposed revision of [PR0 #7376](https://github.com/duckduckgo/apple-browsers/pull/7376), not a description of that PR's currently published diff.
|
||||
**Proposed change:**
|
||||
|
||||
**Change and purpose.** Replace the initialization-failed, stuck, recovered-with/without-reload and CPM post-reload-failure pixels with `web_extension_cpm_episode`. Put the initial failure and observed outcome together, avoiding reconstruction of a failure/recovery chain from separate events.
|
||||
Replace separate `init_failed`, `stuck`, `recovery[with/without reload]` and CPM post-reload-failure events with `web_extension_cpm_episode`. Each report contains the initial failure and its observed outcome, so diagnosis no longer allows joining a sequence of events.
|
||||
|
||||
The first timeout opens an existing monitor episode and captures one diagnostic snapshot. Later failures update local stuck/reload state. A qualifying dashboard response or a five-minute deadline emits the terminal report. The new timer closes quiet episodes without waiting for another navigation; closing an episode cancels its timer and prevents duplicate reports. Stuck detection and automatic reload triggers retain their existing rules.
|
||||
|
||||
|
||||
**Five added summary parameters.**
|
||||
**When it fires:**
|
||||
|
||||
- `reason`: the first timeout's context — `session_restoration`, `tab_crash`, `extension_reload` or `other`. Previously encoded in failure pixel names.
|
||||
The first `4s` timeout opens an episode and captures one diagnostic snapshot.
|
||||
|
||||
Later failures and reloads update local state. A qualifying dashboard response or a five-minute deadline closes the episode and emits one logical report. The deadline works without further navigations. Existing stuck detection and automatic reload behavior are preserved.
|
||||
|
||||
|
||||
|
||||
**Attribution:**
|
||||
|
||||
**Five added summary parameters:**
|
||||
|
||||
- `reason`: the first timeout's context — `session_restoration`, `tab_crash`, `extension_reload` or `other`. [Previously](https://app.asana.com/1/137249556945/project/481882893211075/task/1218619301158188?focus=true) encoded in failure pixel names.
|
||||
|
||||
- `was_stuck`: whether a later eligible non-restoration navigation, begun after the first failure, also timed out.
|
||||
|
||||
- `outcome`: `failed_measurement_response` for the measurement that timed out; `failed_tab_response` for a later measurement on a failing tab; `other_tab_response` for another tab; `unattributed_response` for an ambiguous current-document match; or `no_response_before_deadline`.
|
||||
|
||||
- `reload_state`: `none` (no reload observed), `pending` (replacement started), `failed` (replacement failed), `loaded` (replacement loaded), or `response_timed_out` (its first eligible messaging measurement timed out). Loaded alone does not prove messaging recovery.
|
||||
|
||||
- `response_after`: elapsed time since the first failure, bucketed as `under_30s`, `30s_to_1m` or `1m_to_deadline`. Omitted for the no-response outcome.
|
||||
|
||||
|
||||
**Eight retained diagnostic booleans.** All are captured at the first failure; unavailable facts are omitted.
|
||||
**Eight existing diagnostic booleans** from [✓ TD: CPM failure pixels attribution](https://app.asana.com/1/137249556945/project/481882893211075/task/1218619301158188?focus=true): all are captured at the first failure; unavailable facts are omitted.
|
||||
|
||||
- `context_loaded` — extension context loaded; `bg_view_alive` — current background view exists.
|
||||
|
||||
- `bg_process_alive` — its process is alive; `bg_process_responsive` — WebKit considers it responsive.
|
||||
|
||||
- `tab_in_context` — failing tab registered in WebKit; `handler_registered` — autoconsent native handler registered.
|
||||
|
||||
- `tab_controller_match` — tab and context controllers match; `tab_has_ext_scripts` — extension scripts remain registered.
|
||||
|
||||
|
||||
|
||||
|
||||
`bg_events` is kept included, using the existing encoder: the latest 12 events at the first failure, oldest first, as sanitized `token@age` entries. Ages use `30s`, `1m`, `2m`, `5m`, `15m` and `over_15` buckets; older entries are dropped to keep the value within 255 characters. The timeline can contain error descriptors. Later failures and recovery do not replace or append to this snapshot.
|
||||
|
||||
|
||||
|
||||
Standard metadata remains: `appVersion` on both platforms, plus `pixelSource` and `channel` on macOS.
|
||||
|
||||
**Parameters removed from transmission.** `context_errors`, `network_restarted`, `critical_memory_age`, `bg_view_creations`, `bg_view_leaked_count`, `app_version_change`, `app_launch_age`, `background_graveyard_enabled` and `recovery_from`. Episode state and response attribution replace `recovery_from`. Graveyard attribution is also removed from the diagnostic model and monitor.
|
||||
|
||||
|
||||
**Retained lifecycle history.** `bg_events` is included alongside the eight booleans, using the existing encoder: the latest 12 events at the first failure, oldest first, as sanitized `token@age` entries. Ages use `30s`, `1m`, `2m`, `5m`, `15m` and `over_15` buckets; older entries are dropped to keep the value within 255 characters. The timeline can contain error descriptors. Later failures and recovery do not replace or append to this snapshot. This preserves lifecycle ordering for diagnosis; combinations of timeline and scalar fields may still be correlatable.
|
||||
**Remove retired pixels from** [✓ TD: CPM failure pixels attribution](https://app.asana.com/1/137249556945/task/1218619301158188)**:**
|
||||
|
||||
**Frequency and platform wiring.** Both adapters use the same base event name, with no added `_macos` suffix. Keep `daily+count`: the first completed episode of the day sends both legs with identical parameters; subsequent episodes send count only. Daily deduplication is by event name, not reason/outcome, so daily estimates overall affected installations rather than unique installations for every outcome.
|
||||
- `debug_web_extension_cpm_initialization_failed_after_session_restoration`
|
||||
|
||||
- `debug_web_extension_cpm_initialization_failed_after_other`
|
||||
|
||||
|
||||
**Definition cleanup.** Remove 11 retired CPM pixel definitions and 9 unused parameter dictionary entries per platform; retain the `background_events` dictionary entry on both. The separate `debug_web_extension_reload_failed` remains emitted by the extension manager.
|
||||
|
||||
|
||||
**Scope and limits.** This local revision does not include the original #7376 additions: `bg_ready_after`, `bg_view_age`, `bg_load_error_after`, `bg_load_error_app_state`, `app_state`, `open_tabs`, `loading_tabs`, `recovery_document` or `recovery_after`. Missing diagnostic facts need an explicit follow-up decision; fix-specific application/outcome metrics belong in the relevant fix PRs. Preventive-fix metrics must include eligible attempts that succeed without a failure episode.
|
||||
**Parameters removed from transmission:**
|
||||
|
||||
A dashboard response proves neither document-level `initResp` delivery nor recovery of every failing tab. A deadline reports absence of qualifying evidence, not that all tabs died. Unfinished episodes can be lost when the monitor is released or the process exits.
|
||||
`context_errors`, `network_restarted`, `critical_memory_age`, `bg_view_creations`, `bg_view_leaked_count`, `app_version_change`, `app_launch_age`, `background_graveyard_enabled` and `recovery_from`. Episode state and response attribution replace `recovery_from`. Graveyard attribution is also removed from the diagnostic model and monitor.
|
||||
|
||||
**Validation.** All 742 WebExtensions package tests passed on macOS. Coverage includes first-failure timeline preservation, empty-timeline omission, response attribution, reload generations, deadline-only reporting, duplicate prevention, payload allowlisting and absence of graveyard attribution. macOS PixelKitMock checks, both platform definition validators, wide-event consistency checks and strict SwiftLint passed.
|
||||
|
||||
Related: [[cpm-status-2026-10-15|CPM status]], [[cpm-readiness-telemetry-tech-design-2026-10-15|Original readiness telemetry design]].
|
||||
Reference in new issue
Block a user