[2026-10-16] eagle: work/projects/cpm-readiness-telemetry-tech-design-2026-10-15.md work/projects/cpm-status-2026-10-15.md work/projects/cpm-web-extension-code-guide-2026-10-09.md

This commit is contained in:
Alexey Martemyanov committed 2026-10-16 18:25:13 +06:00
1 parent f684e6a9cc
commit 4416d5435e
3 files changed
+28

No files matched your search

@@ -162,3 +162,10 @@ The final build uses owned UUID extension resources under unswizzled `NSTemporar
### Rerun requested by user — 16 Oct 04:37 UTC
Current versions of the formerly failed selections passed again: 18+1+1 methods, zero XCTest failures/skips/expected failures, same signed binary/source hashes. Artifacts: `/private/tmp/cpm-app-integration-20261015/rerun-failed-20261016-042858/rerun-summary.json`. P3 remains negative (20k cache entries). Cache teardown logs a nonfatal SQLite `vnode unlinked while in use` warning for its owned store; this infrastructure warning and the historical longer P5 limitation are not claimed resolved. The current P5 repeats one failed navigation plus controls; the old two-timeout source variant was not rerun as if fixed. Repeatability does not change the controlled-fault versus production-cause boundary documented at the top of this design.
### P1/P2 local fix validation — 16 Oct, background-only candidate
The first P2 full-context-reload prototype was rejected: a repeated real error-6 test lost the existing page's initResp despite a successful native dashboard. The current local candidate preserves WKWebExtensionContext and retries the public background-load API after the actual load-error notification. Its app regression requires recovery of the **same failed document without navigation or context replacement**, with both native dashboard and page initResp; the observed pixel is recovered_without_extension_reload / recovery_document=failed_navigation / recovery_after=30s_to_2m. The existing confirmed-hang M4 remains the full-reset fallback.
P1 prepares background on each main-frame web navigation with a real 5 s bound/cancellation; the imposed 8 s startup now yields a healthy first document. This neither accelerates worker execution nor establishes a universal fix for longer delays. P1/P2 point cases initially passed 2/2; the package passed 806 tests with 14 opt-in skips, 0 failures. Full final app matrix, disabled-fix controls and limits remain in [[cpm-status-2026-10-15]] and `/private/tmp/cpm-p1-p2-fixes-20261016/`. No telemetry schema change, commit, PR mutation or iOS production attribution is implied.
+6
View File
@@ -776,3 +776,9 @@ P2 реализация уточнена: manager наблюдает публи
`pinned.xcresult`: один assertion FAIL: bg_view_creations ожидался 2, стал 3_to_5. Остальные P5 assertions (реальная потеря tab registration, controller match, lost navigation и healthy controls) прошли. Причина дополнительного view установлена по коду: новый P1 явно будит background **перед** тем, как WebKit отвергает сообщение неизвестной pinned tab. Для включённого navigation gate актуализирован строгий ожидаемый bucket на 3_to_5; сам сбой не спрятан и не исправлен этим изменением.
`cache.xcresult`: **PASS 45.702 s**, P3 по-прежнему не воспроизведён. В teardown снова есть nonfatal libsqlite3 `vnode unlinked while in use` для owned UUID store `71644ce9-6351-4c46-b915-825beb961ee6`, в этот раз EnhancedSecuritySites.db. Это отдельное ограничение cleanup, не зелёная проверка целостности SQLite и не сбой CPM assertion. Исторические прогоны и warning сохранены.
### Background-only retry: первый строгий P2 PASS без смены документа/контекста
`background-retry-points.xcresult`: **2/2 PASS**, 0 failed/skipped/expected failures. **P1 49.734 s**, **P2 85.234 s**. Для P2 теперь проверено: реальный error 6 → публичный повторный `loadBackgroundContent` → **исходный failed document получает native dashboard и page initResp до любой следующей навигации**, context object остаётся тем же. Затем существующая tab, новое окно и новая tab здоровы. Доставку не имитировали и не переинициализировали документ из теста.
Фактический pixel в `background-retry-points-evidence/A7C288DA-DCCE-42DC-BC30-6E8D6865526D.json`: `debug_web_extension_cpm_messaging_recovered_without_extension_reload`, `recovery_from=initialization_failed`, `recovery_document=failed_navigation`, `recovery_after=30s_to_2m`. Это **новый кандидат**, прежний once-green full-context prototype не входит в его подтверждение. Пакет: 806 tests / 14 skips / 0 failures (`unit-package-background-retry.log`), strict lint — 0 violations. Идёт общий app-run с повтором P2, затем новые negative controls и P5/cache на этой же сборке. Окончательная source matrix пока не завершена.
@@ -225,3 +225,18 @@ App harness isolation follow-up: extension resources now use an owned UUID direc
16 Oct clarification/rerun: all 20 current app methods passed again in 18+1+1 groups, same signed build and source hashes; `/private/tmp/cpm-app-integration-20261015/rerun-failed-20261016-042858/rerun-summary.json`. This is an instrumented app-test environment, not an unchanged shipping binary. P1/P2 delay/SIGSTOP and message/native/dashboard loss are imposed faults; P5/P6/Network use real lifecycle paths but their production occurrence/causal attribution is a separate claim. Old long P5 is still outside the verified app scope; P3 remains unreproduced. Cache teardown has a recorded nonfatal SQLite warning. Submodules are not required by these CPM cases: privacy-reference-tests resources map to Unit Tests targets, SnapshotReferences to snapshot testing support, not XCUI accessibility snapshots. Neither submodule was initialized or modified by this rerun.
## Локальный кандидат P1/P2 — 16 октября 2026 (без commits)
Worktree `cpm-e2e-init`, HEAD всё ещё `46f25175c7c42766cab23ea39f447f075c7bdd24`. Эта секция дополняет прежнюю карту: #7379 не изменялся, новая работа пока только локальная.
- `WebExtensionLifecycleCoordinator.initialLoadWaiter`: после launch gate проверяет подготовку background на каждом HTTP(S) main-frame navigation. Await ограничен прежними 5 s и отменой navigation; AsyncStream позволяет освободить navigation даже при callback WebKit, игнорирующем cancellation. Жизненный цикл load/sync этим не блокируется.
- `WebExtensionManaging.prepareEmbeddedBackgroundForNavigation`: новый protocol hook с no-op default для лёгких conformers. Реализация — `WebExtensionManager.swift`, без нового project file.
- `WebExtensionManager.loadEmbeddedExtensionBackgroundContent`: публичный callback API + одна shared startup task на текущий context. Error notification завершает/очищает старую readiness task, чтобы новая попытка не приклеилась к завершённому старому startup.
- `WebExtensionManager.recoverEmbeddedBackgroundLoadFailure`: собственный текущий embedded context, настоящий domain/code 6, существующий recovery kill switch, known app_state != background, отсутствие M4 in-progress и cooldown 60 s. **Повторяется только background load; context/Tab/controller не заменяются.** Полный M4 reload остаётся при confirmed stuck. Старый full-context P2 prototype отброшен: он терял page initResp в existing tab при повторе.
- `CPMAppKnownFailureIntegrationTests.testSlowBackgroundWakeKeepsFirstNavigationHealthy`: actual idle + 8 s worker delay, первый документ получает native+page без detector failure.
- `...testFrozenBackgroundRecoversAutomaticallyForNextNavigation`: actual one-tab idle wake, owned SIGSTOP 45 s, настоящий error 6. Требует native+page на **том же failed document до новой navigation**, тот же объект context и recovery_document=failed_navigation; затем healthy existing/new-window/new-tab.
- Raw P1 и P3 characterization отключают navigation gate; P5 остаётся с gate включённым и ожидает bucket bg_view_creations=3_to_5: подготовка P1 создаёт дополнительный background перед rejected unknown-tab message. P5 tab-registration loss и healthy controls по-прежнему проверяются.
Артефакты и snapshots: `/private/tmp/cpm-p1-p2-fixes-20261016/`. `before-changes.tar.gz` сохраняет прежние dirty changes; `point-fixes.diff` предназначен для delta этой работы. Начальный background-only result — 2/2 PASS, пакет 806/14 skipped/0 failures. Общий run/negative controls/P5/cache ещё выполняются; окончательный исход — в [[cpm-status-2026-10-15]]. Зелёный случай относится к macOS с imposed timing/process faults; natural iOS cause по-прежнему не доказан.