Files
obsidian-vault/work/projects/cpm-pr0-episode-telemetry-summary-2026-10-16.md
T

34 lines
2.8 KiB
Markdown
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: CPM PR0 — one terminal report per failure episode
date: '2026-10-16'
tags:
- work
- cpm
- telemetry
---
# CPM PR0: one terminal report per failure episode
Local changes for [PR0 #7376](https://github.com/duckduckgo/apple-browsers/pull/7376), in `alex/cpm-telemetry-pr0`, uncommitted.
**What and why.** Replace separate `init_failed`, `stuck`, `recovery` and CPM reload-failed events with `web_extension_cpm_episode`. Each report contains the initial failure and its observed outcome, so diagnosis no longer requires joining a sequence of events.
**When it fires.** The first 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 behaviour are preserved.
**What it contains.** Initial failure reason, stuck confirmation, latest reload state and observed outcome. Responses distinguish the original measurement, a later measurement on a failing tab, another tab and ambiguous attribution. Response delay uses three buckets: under 30 seconds, 30–under 60 seconds, and one minute to the deadline.
The initial snapshot records fixed facts about the extension context, background view/process, tab and native-handler registration, controller match and extension scripts.
**Privacy and counting.** Exclude `bg_events`, raw errors, identifiers, diagnostic counts and app/memory-pressure ages. Rare parameter combinations may still be correlatable.
Keep `daily+count`: daily estimates installations with a completed episode that day; count measures completed episodes. The first report each day sends both legs with the same payload; subsequent reports send count only.
**Fix attribution.** The agreed PR0 contract excludes graveyard attribution; removing that legacy field from the local code is still pending. Add fix-specific application/outcome metrics in the relevant fix PRs when needed. Preventive fixes must also count eligible attempts that succeed without a failure episode. Current diagnostic facts do not distinguish all five failure groups.
**Limits.** A dashboard response does not prove document-level `initResp` delivery or recovery of every failing tab. A deadline means no qualifying response was observed. Unfinished episodes can be lost when the process exits.
Retired pixel definitions and unused parameters are removed on both platforms. The manager still sends the separate `debug_web_extension_reload_failed` event.
**Validation.** 82 focused tests, macOS PixelKitMock verification, both platform definition validators and strict SwiftLint passed.
Related: [[cpm-status-2026-10-15|CPM status]], [[cpm-readiness-telemetry-tech-design-2026-10-15|Readiness telemetry design]].