diff --git a/work/projects/cpm-permanent-breakage-metric-tech-design-2026-11-10.md b/work/projects/cpm-permanent-breakage-metric-tech-design-2026-11-10.md index 752b5ece..c1636d43 100644 --- a/work/projects/cpm-permanent-breakage-metric-tech-design-2026-11-10.md +++ b/work/projects/cpm-permanent-breakage-metric-tech-design-2026-11-10.md @@ -84,8 +84,8 @@ The episode pixel `web_extension_cpm_episode` with its timers, episode state and |---|---|---| | 1, [#8025](https://github.com/duckduckgo/apple-browsers/pull/8025) | Remove ineffective recovery fixes and flags | pushed, in review | | 2, `alex/cpm-pixel-cleanup` (`de24abf498`) | All removal. The monitor shrinks to learning which extension tab belongs to which app tab and letting the manager reset its restart budget. Tabs report one commit event with an eligibility flag; navigation start, finish and failure events are gone. | local, one commit on `6928847174`; 1004 package tests pass; not pushed. iOS error pages are ineligible; back/forward is read at navigation start | -| 3, `alex/cpm-breakage-metric` (`c6f163df4e`) | Per-tab silence, the two pixels, `tabs`, definitions, adapters | local, one commit on PR 2; 1047 package tests pass; validators pass; not pushed | -| 4, `alex/cpm-init-marks` (`b241294712`) | Init progress marks and `last_stage`; extension #3727 | local, one commit on PR 3; 1069 package tests pass; not pushed | +| 3, `alex/cpm-breakage-metric` (`27b2c1f5e9`) | Per-tab silence, the two pixels, `tabs`, definitions, adapters | local, one commit on PR 2; 1048 package tests pass; validators pass; not pushed | +| 4, `alex/cpm-init-marks` (`68be37f16a`) | Init progress marks and `last_stage`; extension #3727 | local, one commit on PR 3; 1071 package tests pass; not pushed | ### Known limits @@ -94,6 +94,9 @@ The episode pixel `web_extension_cpm_episode` with its timers, episode state and - A single-page app changing its path can break the host and path match for a tab that is not mapped yet. - Pages the extension does not inject into (some non-document types) send no message and look silent. The MIME type is not available at commit, so these are not filtered. - A message within 2 s before a commit is counted as that commit's answer even when it belonged to the previous page. +- A message from an extension tab that already belongs to another app tab is never counted as an early answer (or mark) for a new tab's commit. A late refresh from the previous page of a mapped tab, arriving after the next commit, still answers the new page; marks are checked against the current page, answers are not. +- A reload of the same page within 2 s of its last mark starts with that mark's stage; `last_stage` can then show the previous load's furthest stage instead of `none`. +- A first message can teach the wrong tab when another tab sits on the same host and path but is not in the committed pages (back/forward or restored page) inside the 2 s window; that tab's later commits then count as silent. Low likelihood, not guarded. - The dashboard refresh is sent independently of `initResp`, so a page whose `initResp` was never delivered counts as answered. - The first series has no overlap with the episode series: comparison is by app version against the previous derived number. - The restart budget now resets on any dashboard refresh from the current embedded extension, not on a message matched to a page, and without the old http(s) and generation filters. @@ -120,6 +123,7 @@ The episode pixel `web_extension_cpm_episode` with its timers, episode state and - Pixel definitions pass both validators; adapter tests check names, frequency and parameters. - App-hosted macOS and iOS tests: not run in this stack; package tests, validators, SwiftLint and the macOS `build-for-testing` are the checks. - Manual: [[CPM Breakage Testing Steps]] with the Debug switch. +- iOS `build-for-testing` (iOS Unit Tests, simulator) passes on PR 4. - Real WebKit (CPM repro harness, [PR #7378](https://github.com/duckduckgo/apple-browsers/pull/7378)): not run. ## Additional Considerations (if applicable) diff --git a/work/projects/cpm-project-summary-2026-11-03.md b/work/projects/cpm-project-summary-2026-11-03.md index 17730384..f43667d3 100644 --- a/work/projects/cpm-project-summary-2026-11-03.md +++ b/work/projects/cpm-project-summary-2026-11-03.md @@ -124,8 +124,8 @@ Open: **Раскладка (локально, по одному коммиту на ворктри, не запушено, PR не создавались).** - PR 2 `alex/cpm-pixel-cleanup`: `de24abf498` на `6928847174`. Вся чистка, монитор урезан до сопоставления вкладок и сброса бюджета перезапусков; вкладки шлют одно событие коммита с флагом `isEligible` (iOS: error page не измеряется, back/forward читается на старте навигации), события старта/финиша/ошибки навигации удалены. 1004 теста пакета. -- PR 3 `alex/cpm-breakage-metric`: `c6f163df4e` на PR 2. Молчание по вкладкам, два пикселя, определения обеих платформ, адаптеры. После ревью: вкладки, замолчавшие в одной проверке, все `many`; сообщение до коммита отвечает и для ещё не выученной вкладки; монотонные часы; refresh без ответа (`config_unavailable`/`settings_missing`) не ответ, но сбрасывает бюджет перезапусков. 1047 тестов пакета. -- PR 4 `alex/cpm-init-marks`: `b241294712` на PR 3. Метки init по вкладкам и `last_stage`; метка учитывается только для текущей страницы вкладки, метки до коммита приписываются новой странице. 1069 тестов пакета. Расширение `#3727` не менялось. +- PR 3 `alex/cpm-breakage-metric`: `27b2c1f5e9` на PR 2. Молчание по вкладкам, два пикселя, определения обеих платформ, адаптеры. После ревью: вкладки, замолчавшие в одной проверке, все `many`; сообщение до коммита отвечает и для ещё не выученной вкладки; монотонные часы; refresh без ответа (`config_unavailable`/`settings_missing`) не ответ, но сбрасывает бюджет перезапусков. 1048 тестов пакета. +- PR 4 `alex/cpm-init-marks`: `68be37f16a` на PR 3. Метки init по вкладкам и `last_stage`; метка учитывается только для текущей страницы вкладки, метки до коммита приписываются новой странице. 1071 тест пакета. Расширение `#3727` не менялось. Старые коммиты сохранены как `refs/backup/cpm-old-pr3` (`82d29f412a`) и `refs/backup/cpm-old-pr4` (`e8dc96dec2`) в репозитории `apple-browsers.git`. **Проверено:** `swift test` пакета на каждой ветке, мутационные проверки (ответ после проверки, нет сдвига на приостановку, persistent на одной вкладке, нет допуска, метка считается ответом, ранг понижается), валидаторы определений пикселей обеих платформ, SwiftLint strict на изменённых файлах, `xcodebuild build-for-testing` macOS. **Не запускалось:** app-hosted тесты macOS и iOS (кроме трёх тестов `NavigationPixelNavigationResponderTests`, запущенных до запрета), сборка iOS (падает на двух script phases, окружение), реальный WebKit. diff --git a/work/projects/cpm-wake-init-detection-tech-design-2026-11-10.md b/work/projects/cpm-wake-init-detection-tech-design-2026-11-10.md index c5b03ca5..faf9bd8a 100644 --- a/work/projects/cpm-wake-init-detection-tech-design-2026-11-10.md +++ b/work/projects/cpm-wake-init-detection-tech-design-2026-11-10.md @@ -146,7 +146,7 @@ Compatibility and sequencing: ## Testing - Extension: `make unit-test` (the cookie-prompt-management suite), `npm run tsc`, `npm run lint`. The uncommitted part has not been run. -- Native unit tests (PR 4, package suite 1069 tests): the report carries the furthest stage of the silent tab and not of another tab; no marks give `none`; a mark is not an answer; unknown stage ignored by the handler; a mark that cannot be tied to one tab dropped; a mark just before the commit belongs to the new page and an older one is forgotten; old extension and simulation ignored; closed tab forgets its marks; `last_stage` in the pixel on both platforms. Mutation checks (a mark answers, rank lowers, stage kept forever, stage always cleared) each fail a test. App-hosted tests were not run. +- Native unit tests (PR 4, package suite 1071 tests): the report carries the furthest stage of the silent tab and not of another tab; no marks give `none`; a mark is not an answer; unknown stage ignored by the handler; a mark that cannot be tied to one tab dropped; a mark just before the commit belongs to the new page and an older one is forgotten; old extension and simulation ignored; closed tab forgets its marks; `last_stage` in the pixel on both platforms. Mutation checks (a mark answers, rank lowers, stage kept forever, stage always cleared) each fail a test. App-hosted tests were not run. - Real WebKit (CPM repro harness, [PR #7378](https://github.com/duckduckgo/apple-browsers/pull/7378)): the full chain shows every mark in order on a healthy page; a page without the content script yields no `response_sent`; an injected stall at each await shows the matching `last_stage`; a delay on the native round trips for `config_read` and `settings_checked`. These runs have not been done. - Pixel definitions pass both platforms' validators in CI. - Privacy check of real payloads: the marks contain `url` on the extension-to-app channel only; the pixel carries the enum only. @@ -171,7 +171,7 @@ None. The comparison is across releases and channels (see the heisenbug risk). **Operational** -- Order of landing: native handler and `last_stage` (PR 4, `alex/cpm-init-marks`, `b241294712`, on top of PR 3 `c6f163df4e`) can ship before the extension; the extension PR merges after review and enters the app through the usual embedded-files update. +- Order of landing: native handler and `last_stage` (PR 4, `alex/cpm-init-marks`, `68be37f16a`, on top of PR 3 `27b2c1f5e9`) can ship before the extension; the extension PR merges after review and enters the app through the usual embedded-files update. - After the first public release with marks: `last_stage × background × platform` over the breakage count, and the share of breakages by stage, to pick the fix according to the table above. Data checks as in the companion design. - The marks and the parameter are temporary investigation tools. Remove `config_read`, `settings_checked`, `site_checked` and `last_stage` when the wake group has a fix or is closed (project plan: close the project and reset the target if the new metrics show nothing actionable). The expiry date follows the pixel definition (2027-01-15). - Not in scope: per-stage durations (a time bucket between marks), the background's own lifecycle metrics, and the idle-unload distance. They are the next candidates if `last_stage` leaves the wake group unexplained.