[2026-10-16] eagle: personal/projects/virfield.md 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:
1 parent
f2d4c4efd0
commit
c19514e1ab
4 files changed
+70
-4
No files matched your search
@@ -1,3 +1,5 @@
|
||||
> **Local app validation complete — 16 Oct 2026, 01:48 Bishkek / 15 Oct 19:48 UTC.** Twenty app-hosted methods passed with **0 failures, skips or expected failures** in three invocations of the same signed build: 18 together, P5 separately, persistent cache separately. This validates the requested slow-load, one-navigation/recovery, single-tab, several-tabs/one-window and all-windows diagnostics scenarios. Source-linked app P1/P2/P5/P6 and Network paths are covered; P3 was **not reproduced** with 20,000 cached resources, background SIGKILL self-healed, and app P5 proves one lost navigation plus controls. The earlier red joint run and long P5 attempts remain documented. See [[cpm-status-2026-10-15#Финальный app-hosted итог — 16 октября 2026]] for the full matrix, evidence and limits. No commits, PR changes or telemetry schema changes. PR/CI and production-data statements below retain their original dated provenance.
|
||||
|
||||
# TD: Pixel Definition: CPM Readiness Telemetry (macOS/iOS)
|
||||
|
||||
> **Internal documentation update — 2026-10-15, 17:26 UTC.** Current evidence, unresolved review decisions and PR stack: [[cpm-status-2026-10-15]]. This update does not approve or implement the proposed schema changes.
|
||||
@@ -148,3 +150,8 @@ The known-path methods also execute the real AppDelegate main/embedded flag tran
|
||||
The persistent-cache characterization now completes cleanup (`signed-large-cache-session-end.xcresult`, 47.519 s). A fresh UUID website/controller profile actually receives 20,000 cacheable resources and has disk-cache records; real reload changes the extension baseURL. In that run, immediate post-reload messaging was healthy and `p3NoBackgroundFailure=false`. Passing this test means the experiment and recovery/cleanup controls succeeded; **P3 itself was not reproduced**. `_terminateNetworkProcess` is used only in teardown of the owned test host, after evidence capture/data clearing, to permit removal of that UUID store. It adds no selector to production diagnostics and changes no telemetry schema.
|
||||
|
||||
P1 slow idle wake and P2 real WebKit load timeout have signed app passes; the latter records actual error 6 near the 30-second deadline after stopping the owned worker. These are macOS mechanisms, not proof of the causal attribution of iOS production groups. Runtime listener-metadata loss, iOS suspend/resume/device errors and actual production flag changes remain unresolved. The final current-source regression outcome will be recorded in the main status; original CI/PR and ClickHouse snapshots above are dated 15 October and have not been refreshed by these local app tests.
|
||||
|
||||
|
||||
### Final current-source verification
|
||||
|
||||
The final build uses owned UUID extension resources under unswizzled `NSTemporaryDirectory()`, outside TestRunHelper's shared cleanup root. The same 18-method selection that previously failed now passes completely (`signed-isolated-regression.xcresult`): actual Network termination fails 4/4 tabs across two windows and explicit reload/readiness restores all four; the following slow-wake test also passes. The prior deleting actor remains unidentified. Final P5 passes separately in 72.644 s; persistent cache passes separately in 43.053 s, records `p3NoBackgroundFailure=false`, and removes its own UUID store. All three XCTest summaries have zero failures, skips and expected failures. The 20 exported reports, source hashes and trial history are indexed by `/private/tmp/cpm-app-integration-20261015/app-test-results.json`. Strict SwiftLint on all 11 changed Swift files has zero violations; both Integration Tests targets contain the six new test files. Main app/XCTest use normal Apple Development signing; no unsigned or SecureVault bypass remains. The nested VPN Debug packaging deep-verify limitation is recorded in the main status and is not claimed fixed.
|
||||
@@ -11,12 +11,13 @@ tags:
|
||||
|
||||
Внутренний документ. **Цифры из ClickHouse, в публичные PR, комментарии и issues не переносить** (репозитории `duckduckgo/apple-browsers` и `duckduckgo/duckduckgo-privacy-extension` публичные). Заменяет заметку `cpm-telemetry-data-requirements-2026-10-15` (теперь ссылка сюда). Исторические срезы с собственными датами и знаменателями: [[cpm-web-extension-public-attribution-2026-10-05]], [[cpm-web-extension-data-analysis-summary-2026-10-08]], [[cpm-web-extension-repro-and-fix-2026-10-08]]. Актуальная карта worktree и точек входа добавлена в [[cpm-web-extension-code-guide-2026-10-09]]; её прежние разделы сохранены как карта на 9 октября.
|
||||
|
||||
**Дополнение 16 октября: app-hosted integration tests.** Добавлены 20 методов в `cpm-e2e-init`, схема `CPM Integration Tests`, штатная Apple Development signing, без commits. Все результаты, включая красные совместные прогоны, отрицательный P3 и ограничение app P5, находятся в §13. Финальную сводку §13 считать текущей; ранние «пока нет результатов» — сохранённая хронология. PR/CI и ClickHouse в рамках app-тестов заново не запрашивались.
|
||||
**Дополнение 16 октября: app-hosted integration tests.** Добавлены 20 методов в `cpm-e2e-init`, схема `CPM Integration Tests`, штатная Apple Development signing, без commits. Финальный результат — **20/20 PASS в группах 18+1+1**, 0 failed/skipped/expected failures. Все результаты, включая красные совместные прогоны, отрицательный P3 и ограничение app P5, находятся в §13 и [[#Финальный app-hosted итог — 16 октября 2026]]. Финальную сводку §13 считать текущей; ранние «пока нет результатов» — сохранённая хронология. PR/CI и ClickHouse в рамках app-тестов заново не запрашивались.
|
||||
|
||||
**Предыдущая сверка — 15 октября, 17:26 UTC / 23:26 Бишкек.** Разделы 1–9 — сводный статус; §10–11 — сохранённая хронология экспериментов, где «пока», «не найдено» и красные ожидания относятся к моменту записи. Текущий итог всех 14 P5/P6-проверок, границы доказательства и команды — §12. PR/CI сверены read-only через GitHub; результаты локальных тестов сверены с существующими логами и исходниками, в этом документационном проходе тесты и ClickHouse-запросы заново не запускались.
|
||||
|
||||
## 1. Коротко
|
||||
|
||||
- **App integration, 16 октября: 20/20 PASS, 0 failed/skipped/expected failures**, на одной signed build в группах **18 + 1 P5 + 1 cache**. Отдельные тесты slow load, one-navigation recovery, persistent one-tab, several-tabs/one-window и all-windows реализованы и прошли. Реальные app/WebKit пути, полный реестр, отрицательный P3, ограничение app P5 и сохранённые красные прогоны — [[#Финальный app-hosted итог — 16 октября 2026]]. Коммитов нет.
|
||||
- Фикс **B** (падение Network-процесса) проверен локально и красным прогоном на CI. **Основание в данных есть, но неполное:** обогащение в stuck есть, а доказать, что строки это именно мёртвый worker, нельзя (не хватает `network_replaced_since_view`).
|
||||
- Фикс **A** (первая загрузка посреди сессии) реален, но мелкий: около 1% stuck на iOS, на macOS почти не виден, чаще самоизлечивается.
|
||||
- Три самые крупные production-группы фиксами A и B **не закрыты**: пробуждение после idle, error 6 (iOS), «нет background view» на запуске (iOS). В новых signed app integration tests macOS теперь проверены рычаги P1 (slow idle wake) и P2 (остановка worker → настоящий WebKit error 6 около 30 s). P3 на 20 000 cacheable ресурсов не воспроизведён. Это локальные macOS-механизмы, а не доказательство причин iOS production-групп (§13).
|
||||
@@ -648,3 +649,56 @@ Source check: production `WebExtensionLoader.loadWebExtension` throws this error
|
||||
`signed-isolated-regression.xcresult`: **TEST EXECUTE SUCCEEDED**, 18/18 methods passed, 0 failures, 0 skipped, on signed `build-signed-resource-isolation.log`. This repeats the same selection that previously went red, with extension files outside the helper's global cleanup root. There are **zero** `CPM APP STORAGE MISSING` messages. The Network method now completes its real 4-tab fault/reload recovery in **21.692 s**, and the next slow-wake method completes in **49.651 s**, without the earlier INT. Real WebKit load-timeout method passes in **68.303 s**. All ten core scope/diagnostics methods pass in the same invocation.
|
||||
|
||||
This verifies the new isolation under the observed conditions; it does not identify the actor that deleted files in the previous run. The prior 16/18 red result remains part of the record. P5 and cache are being repeated separately against this exact build, and will be included in the final matrix rather than described as a single 20-method invocation.
|
||||
|
||||
|
||||
### Финальный app-hosted итог — 16 октября 2026
|
||||
|
||||
**Проверено 15 Oct 19:48 UTC / 16 Oct 01:48 Бишкек: 20/20 методов PASS, 0 failures, 0 skipped, 0 expected failures в трёх запусках одной окончательной signed build.** Это **18 вместе + P5 отдельно + cache отдельно**, а не один 20-method invocation.
|
||||
|
||||
- `signed-isolated-regression.xcresult`: 18/18, включая все 10 основных scope/diagnostics tests, P1/P2, first install/flags и Network recovery.
|
||||
- `signed-isolated-pinned.xcresult`: 1/1, 72.644 s, настоящий app P5 в явно ограниченном one-navigation scope.
|
||||
- `signed-isolated-cache.xcresult`: 1/1, 43.053 s; 20 000 ресурсов за 39.113 s, post-reload probe примерно 0.900 s, `p3NoBackgroundFailure=false`. Собственный persistent store удалён через WebKit; дополнительно проверено отсутствие его каталога.
|
||||
|
||||
Сводки получены через `xcresulttool get test-results summary`, все 20 JSON reports экспортированы. Корень артефактов: `/private/tmp/cpm-app-integration-20261015/`; актуальные evidence directories — `signed-isolated-regression-evidence/`, `signed-isolated-pinned-evidence/`, `signed-isolated-cache-evidence/`. `app-test-results.json` содержит per-method latest result, сохранённую историю красных/зелёных попыток, summaries трёх финальных групп и SHA-256 исходников. Старые красные logs/results сохранены, включая joint 16/18 и длинные P5 attempts.
|
||||
|
||||
Worktree `/Users/admin/DuckDuckGo/apple-browsers.git/cpm-e2e-init`, branch `scratch/cpm-e2e-init`, **HEAD неизменён `46f25175c7c42766cab23ea39f447f075c7bdd24`, commits нет**. macOS 26.7.1 (25G241), Xcode 27.1 (27A9275), system WebKit 21624.5.1.11.3, arm64, GUI session. Финальная сборка — `build-signed-resource-isolation.log`. Apple Development: Alexey Martemyanov (9SAT8X9S84), team HKE973VLUW, hardened runtime; normal project signing defaults. `final-signing.txt` содержит цепочку сертификатов; app debug dylib и XCTest bundle проходят strict signature verification. Весь Debug app имеет отдельно описанное выше ограничение deep verify вложенного VPN Subscription.framework; distribution-валидность не заявляется. Unsigned/vault-bypass workaround в окончательном коде отсутствует.
|
||||
|
||||
#### Полный реестр 20 app methods
|
||||
|
||||
Первые 10 методов — `CPMAppIntegrationTests.swift`, остальные 10 — `CPMAppKnownFailureIntegrationTests.swift`, оба в `macOS/IntegrationTests/CPM/`.
|
||||
|
||||
| Метод | Финальный результат | Что проверено |
|
||||
|---|---|---|
|
||||
| `testHealthyBaselineUsesRealTabsAndNativeDashboard` | PASS · 1.131 s | Baseline: реальные page initResp и native dashboard; tab/controller/handler/readiness/tabs |
|
||||
| `testDiagnosticProxyFlagCanChangeWithoutBreakingMessaging` | PASS · 1.705 s | Proxy flag off/on через macOS adapter: readiness исчезает/возвращается, messaging healthy |
|
||||
| `testSlowHTTPDocumentDoesNotProduceCPMFailure` | PASS · 8.883 s | Медленная HTTP-загрузка (8 s image): handshake healthy, ложного failure нет |
|
||||
| `testSlowNativeSettingsProducesReceivedStageThenSameDocumentRecovery` | PASS · 8.964 s | Медленный native settings (8 s): received → timeout → same-document recovery |
|
||||
| `testOneNavigationFailureRecoversOnNextNavigation` | PASS · 5.307 s | Одна потерянная навигация: none → healthy на следующей, later_navigation, без stuck |
|
||||
| `testPersistentFailureOfOneTabLeavesOtherTabsAndWindowsHealthy` | PASS · 11.167 s | Persistent одна таба: два failure/stuck; same-window/other-window/new-tab controls healthy; clear → recovery |
|
||||
| `testPersistentFailureOfSeveralTabsInOneWindowLeavesControlsHealthy` | PASS · 19.657 s | Две табы одного окна: persistent failure/stuck; оставшаяся таба/другое окно healthy; clear → recovery |
|
||||
| `testPersistentFailureAcrossAllWindowsIncludesNewTabsAndRecoversAfterClear` | PASS · 24.966 s | Все окна: 4 табы и новая таба fail; clear → recovery во всех |
|
||||
| `testAutomaticHangRecoveryReloadsExtensionAndRestoresMessaging` | PASS · 12.870 s | Настоящий M4 после подтверждения hang заменяет context; messaging и recovered_after_reload |
|
||||
| `testDashboardTransportLossIsDistinguishableFromMissingInitResponse` | PASS · 5.293 s | Потеря dashboard confirmation при полученном page initResp: response_sent, затем recovery |
|
||||
| `testMainFeatureOffOnRetainsOldControllerAndBreaksExistingTabs` | PASS · 14.562 s | P6: реальные main-flag off/on callbacks; старый controller у existing tabs, новая таба healthy |
|
||||
| `testFirstMainFeatureEnableLeavesExistingTabsWithoutController` | PASS · 9.137 s | Первое main enable: existing tabs с nil controller fail; новая таба healthy |
|
||||
| `testEmbeddedOnlyFlagCyclePreservesControllerAfterReadiness` | PASS · 1.256 s | Embedded-only cycle сохраняет controller; healthy после readiness |
|
||||
| `testSharedPinnedTabSurvivesClosingWindowButDisappearsFromWebKit` | PASS · 72.644 s | P5: реальное shared-pin window close → один failure/tab_in_context=false; regular/new-tab healthy |
|
||||
| `testNetworkProcessTerminationRecordsActualCrossWindowOutcome` | PASS · 21.692 s | Реальный Network SIGKILL → 4/4 tabs fail в двух окнах; explicit reload/readiness → все healthy |
|
||||
| `testBackgroundProcessTerminationRecordsCrashAndCanRecoverAfterReload` | PASS · 2.518 s | Реальный background SIGKILL: died_crash/dealloc/new view; в этом WebKit самоизлечился; reload healthy |
|
||||
| `testFirstEmbeddedInstallDuringSessionRecordsStartupRace` | PASS · 11.882 s | Реальный first embedded install с 6 s startup delay: первый init потерян/pending; следующий healthy |
|
||||
| `testLargePersistentCacheRecordsContextReloadInjectionGap` | PASS · 43.053 s | P3 experiment: 20k persistent-cache resources + baseURL-changing reload; P3 НЕ воспроизведён; cleanup/recovery healthy |
|
||||
| `testSlowBackgroundWakeReportsPendingThenRecovers` | PASS · 49.651 s | P1: реальный idle unload + 8 s wake delay; pending/none → timeout → поздний ответ/recovery |
|
||||
| `testFrozenBackgroundHitsWebKitLoadTimeout` | PASS · 68.303 s | P2: новый worker SIGSTOP → настоящий WebKit error 6 около 30 s (25s_to_35s); SIGCONT в cleanup |
|
||||
|
||||
#### Границы доказательства и окончательная реализация
|
||||
|
||||
- **Зелёный characterization test не означает исправление CPM или доказанную production-причину.** Scoped drops/delays действуют только на extracted test copy и проверяют диагностику/масштаб отказа. Навигации, app window/tab callbacks, native provider/delegate, monitor и recorder настоящие; прямые `didCloseTab`/synthetic monitor events для получения failure не вызываются.
|
||||
- **P3 не воспроизведён** на этой машине/20k cache; этот результат не исключает другие размеры, timing или iOS. Background SIGKILL здесь самоизлечился — зафиксирован crash/recovery, не выдуман persistent failure.
|
||||
- App **P5 доказывает одну** потерянную навигацию после реального закрытия окна и здоровые controls. Две app-навигации/stuck не объявляются зелёными: прежние попытки достигали DEBUG MainWindow lifetime guard, который остаётся включён. Persistent P5/stuck проверен отдельными SPM methods (§12).
|
||||
- P1/P2 — управляемые macOS-механизмы. Естественная потеря listener metadata, P5 с tab_in_context=true, iOS suspend/resume/device-only ошибки и production main-flag transitions всё ещё не доказаны.
|
||||
- Устранён риск общего test temp root: extension resources теперь в `NSTemporaryDirectory()/cpm-app-UUID` вне глобального swizzled `com.duckduckgo.macos.tests`, который очищает TestRunHelper. Старый deleting actor не установлен; после изоляции тот же joint selection прошёл 18/18, missing-resource logs нет. Это не выдаётся за установленную внешнюю причину прежнего удаления.
|
||||
- Teardown закрывает только окна своего host, восстанавливает pinned mode/flags, возобновляет остановленные PID и удаляет собственные extension files. Для cache сначала сохраняет evidence, очищает owned website/controller data, завершает Network session этого test host через test-only SPI, освобождает refs и удаляет только свежий UUID store с bounded retry. Пользовательский browser process не выбирается; глобального `killall`/Review-profile wipe нет.
|
||||
- Минимальные seams: optional `controllerConfiguration` с прежним production default; guarded DEBUG AppDelegate factory; собственный ConfigurationStore directory; loopback-only opt-in exception в Tab; internal macOS diagnostics flag adapter для `@testable`. Новая pixel schema/production fix не добавлялись. Шесть новых Swift files включены в **оба Integration Tests targets**, scheme XML/PBX валидны.
|
||||
- Strict SwiftLint **11 Swift files: 0 violations**, `git diff --check` чистый. Прежний dirty bundle сохранён (2026.10.14, SHA-256 `4254967bb447aa45deb371b26fea1dd93850a8e6a654f8ebecd70fccc3859936`) вместе с прежними untracked SPM files. Другой remaining-failures worktree не менялся.
|
||||
|
||||
Повторение: схема **CPM Integration Tests** с project signing defaults; полная инструкция в `macOS/IntegrationTests/CPM/README.md`, карта файлов — [[cpm-web-extension-code-guide-2026-10-09#5. App-hosted CPM integration tests — 16 октября 2026]]. Default scheme пропускает два expensive opt-ins. Реальный timeout включать test-host env `CPM_APP_INTEGRATION_EXPENSIVE=1`. Cache выбирать **отдельным методом** с `CPM_APP_INTEGRATION_CACHE=1`, execution allowance 2400 s (count override `CPM_APP_INTEGRATION_CACHE_ENTRIES`); cache switch применяется ко всем harness instances выбранного invocation. Финальные `.xctestrun` планы сохранены в `DerivedData/Build/Products/CPM-App-Final.xctestrun` и `CPM-App-Cache.xctestrun`. PR/CI/ClickHouse snapshot выше не обновлялся этим локальным тестовым проходом.
|
||||
@@ -6,6 +6,8 @@ tags:
|
||||
- cpm
|
||||
- webkit
|
||||
---
|
||||
> **App integration update — 16 октября 2026, 01:48 Бишкек.** В `cpm-e2e-init` добавлены 20 методов настоящего app-hosted CPM suite: финальные **20/20 PASS, 0 failures/skips/expected failures**, группы 18+1+1 на одной signed build. Схема `CPM Integration Tests`; файлы/guards/запуск/ограничения — §5 ниже, полный реестр и история — [[cpm-status-2026-10-15#Финальный app-hosted итог — 16 октября 2026]]. Без commits. Карта остальных worktree/PR ниже сохраняет свою датированную сверку 15 октября.
|
||||
|
||||
|
||||
# CPM Web Extension — карта кода по worktree и строкам
|
||||
|
||||
@@ -217,3 +219,6 @@ Worktree `/Users/admin/DuckDuckGo/apple-browsers.git/cpm-e2e-init`, branch `scra
|
||||
|
||||
|
||||
App harness isolation follow-up: extension resources now use an owned UUID directory under **unswizzled `NSTemporaryDirectory()`**, outside `com.duckduckgo.macos.tests`. The latter is a shared FileManager swizzle target that TestRunHelper removes on host initialization/bundle completion. A preceding joint run passed 16/18 but lost its Network-test extension resource before reload (`extensionNotFound`), then the next wake test hit INT. The deleter was not identified; latest status must include that red run and the resource-isolation recheck, rather than treating prior isolated passes as a green combined suite. `CPMAppExtensionStorage.resolveInstalledExtension` still delegates to production and adds only missing-folder/root logging.
|
||||
|
||||
|
||||
Финальная сверка §5: `signed-isolated-regression` **18/18**, `signed-isolated-pinned` **1/1 (72.644 s)**, `signed-isolated-cache` **1/1 (43.053 s)**. Все summaries: 0 failures, 0 skipped, 0 expected failures. В последнем cache run 20k ресурсов за 39.113 s, post-reload probe 0.900 s, P3 не воспроизведён, UUID store удалён. Все 20 JSON exported в одноимённые `*-evidence/` directories; `/private/tmp/cpm-app-integration-20261015/app-test-results.json` содержит текущие hashes исходников и всю per-method историю. HEAD `46f25175c7c42766cab23ea39f447f075c7bdd24` сохранён, исходный dirty ZIP не менялся. Финальный strict lint: 11 Swift files, 0 violations; PBX и scheme XML валидны. Предыдущие red attempts сохранены, не превращены в pass; единый invocation всех 20 не выполнялся.
|
||||
Reference in new issue
Block a user