[2026-10-16] eagle: work/projects/cpm-metrics-causes-and-mitigations-2026-10-16.md work/projects/cpm-status-2026-10-15.md

This commit is contained in:
Alexey Martemyanov committed 2026-10-16 20:01:26 +06:00
1 parent 7bf4dce428
commit ee4cd992c1
2 files changed
+12 -1

No files matched your search

@@ -49,7 +49,7 @@ Percentages below are shares of all initial-failure / stuck daily reports in the
- **P4, first mid-session load:** Fix A signature — **iOS init 3.9%, stuck 0.9%**. Broader recent-load cohort: **iOS init 15.7%, stuck 6.0%; macOS init 20.0%, stuck 6.4%**. early init loss is reproduced; Fix A waits for first background readiness. The narrower signature is 129k → 4.6k iOS reports and can include reloads.
- **P5, tab registration lost:** separate shares of all init/stuck reports are unavailable. closing a window containing a shared pinned tab makes WebKit unregister the surviving tab. Correct window/tab lifecycle reporting is the mitigation to develop. The mechanism covers macOS `tab_in_context=false`; other P5 cases remain unexplained. Separate 14 October selection: **13.6% (68 of 499)** of selected macOS P5 stuck reports have that flag; the earlier 494-report selection used different filters.
- **P6, controller mismatch:** broader detached-tab cohort — **iOS init 0.03%, stuck 0.05%; macOS init 6.2%, stuck 8.9%**. P6-only init/stuck shares are unavailable. a main `webExtensions` flag cycle creates a new manager while existing web views retain the old controller. Recreate/rebind affected views when replacing the manager; context reload alone cannot repair this. The conditional mechanism is reproduced, but its occurrence in production is unconfirmed. Selected macOS tails: **627 + 235** reports.
- **Other:** **iOS init 5.3%, stuck 12.5%; macOS init 23.4%, stuck 22.2%**. Residual snapshot category, with several candidate mechanisms. The iOS analysis found P1-like wake traces with views older than the 30-second classification cutoff. In `cpm-e2e-init`, an imposed 8-second native-settings delay produces `init_stage=received`, timeout and same-document recovery; withheld dashboard confirmation produces `response_sent` and timeout despite delivered page `initResp`. Injected message drops reproduce single-document and persistent one-tab, several-tab and all-window failures, including with valid tab/controller diagnostics. These tests establish diagnostic signatures and failure scope; natural triggers and shares within production Other remain unassigned. Suggested actions: test P1 readiness gating against older wake tails; measure native-settings latency for `received`; investigate dashboard delivery for `response_sent`; trace pre-background delivery for `none`. Use healthy readiness baselines and page receipt to distinguish them before choosing recovery.
- **Other:** **iOS init 5.3%, stuck 12.5%; macOS init 23.4%, stuck 22.2%**. Tests reproduce slow settings replies, lost messages, and missing dashboard confirmation even when the page receives its answer. Some iOS reports also resemble slow wake-up (P1). Their individual shares are unknown. Mitigations depend on which step fails: wait for background readiness, reduce settings delays, or fix message/confirmation delivery.
## Open PRs and local validation
+11
View File
@@ -875,3 +875,14 @@ SwiftPM автоматически обновил только package-local con
Все артефакты: `/private/tmp/cpm-p1-p2-clean-20261016/`; машинная сводка `validation-summary.json`, source hashes `cleanup-source-hashes.json`, JSON evidence в `enabled-cleanup-evidence/` и `disabled-evidence/`. Все 18 зафиксированных файлов (включая unchanged ZIP) неизменны во время финальных прогонов. Исходный scratch также сверён с hash прежнего 22/22 прогона: изменений нет. HEAD не сдвинут, commitsCreated=0, generated package pin diff убран из новой ветки.
Границы доказательства сохранены: P1 проверяет imposed 8 s worker start при gate cap 5 s; P2 — реальную error 6 на macOS с одним начальным window/tab и остановкой только своего PID. Естественный триггер в затронутых production-сессиях и поведение iOS suspension/resume этим не доказаны; отдельный resume recovery не добавлен. P3/P5 и другие research-сценарии не включены в чистую ветку и их прежние ограничения не сняты.
## Полная замена #7379: upgrade context и background guard — 16 октября 2026
В том же `alex/cpm-fix-p1-p2` выполняется следующий этап по запросу: объединить P1/P2 с гарантиями #7379 и убрать зависимость recovery safety от diagnostics flag. До изменений сохранены `before.tar.gz`, `before.diff`, `before-hashes.json` в `/private/tmp/cpm-p1-p2-replacement-20261016/`. Коммитов нет.
Изменения: после успешного install выбран и отслеживается **точный новый context по identifier**; navigation waiter захватывает именно его, включая период сосуществования старого/нового. Для fallback учитывается порядок installation store (новый append до удаления старого), между несколькими неизвестными contexts больше нет произвольного выбора. Retry error 6 работает только с актуальным выбранным context и повторно проверяет flag/background перед вызовом WK API.
`isApplicationInBackground` перенесён из diagnostics recorder в самостоятельный lifecycle provider менеджера. iOS factory передаёт прямое чтение `UIApplication.shared.applicationState`, даже при `cpmDiagnosticsRecorder=OFF`. Прежний read-only diagnostics getter удалён. Добавлены unit-регрессии coexistence/replacement removal, diagnostics=nil + background→foreground, runtime recovery kill switch и отказ retry superseded context.
Два install/upgrade-сценария #7379 перенесены с сохранением test method names **в текущий app-hosted harness** (адаптация исходного SPM harness, без копирования остальных research-тестов). Проверяются реальные feature-flag/lifecycle install и version-triggered upgrade, настоящий native dashboard + page initResp; worker новой установки/версии задерживается на 5 s. Отдельно записываются реальные context sets в notifications, чтобы подтвердить coexistence при upgrade. Запущены общий signed build для четырёх app-кейсов и targeted unit suites. Strict lint: 16 Swift files, 0 violations. Результаты предыдущего 2/2 прогона остаются историей и не заменяют проверку новой сборки.