diff --git a/work/projects/cpm-post-release-analysis-2026-10-27.md b/work/projects/cpm-post-release-analysis-2026-10-27.md index d60f74d2..8125b07b 100644 --- a/work/projects/cpm-post-release-analysis-2026-10-27.md +++ b/work/projects/cpm-post-release-analysis-2026-10-27.md @@ -375,3 +375,4 @@ Re-cut of the post-release data (macOS 1.213.x, 26–27 Oct, matured since the s - **Filter implemented (28 Oct, uncommitted, not pushed):** worktree `apple-browsers.git/cpm-error-page-filter`, branch `alex/cpm-error-page-filter` from `8023e4cb5c`. New `CPMNavigationKind.errorPage`; `CPMMessagingHealthMonitor` does not measure a commit/finish of a tab whose current navigation is `.errorPage` (`commitNavigation`, `finishNavigation`), so no timeout, no episode and no M4 for it; macOS `Navigation.cpmMessagingNavigationKind` returns `.errorPage` for `.alternateHtmlLoad` (`PrivacyDashboardTabExtension.swift`). Tests: two monitor unit tests (`testErrorPageIsNotMeasured`, `testNavigationAfterErrorPageIsMeasured`) and the harness `CPMReproErrorPageTests` (3 tests, `CPM_REPRO=1`), all green; the same harness tests failed (`other / failed_tab_response / tabs=1`) before the change, and with it the background still wakes at the navigation but no episode is counted. SwiftLint strict: 0 violations. Not done: iOS error pages (no `loadAlternateHTML` path found on iOS; not checked how they are shown), running the real app, comparing wake share between builds. - **macOS app build with the filter:** `xcodebuild -scheme "macOS Browser" -configuration Debug CODE_SIGNING_ALLOWED=NO` succeeded (the change compiles in the app target). Product: `/private/tmp/claude-501/-Users-admin-DuckDuckGo-apple-browsers-git/2490a862-c422-4358-b940-1f30df9cbb83/scratchpad/app-dd/Build/Products/Debug/DuckDuckGo.app` (scratchpad of that session; may be cleaned). The app was not launched: no window run on the host Mac. The real-app check is still open: three tabs idle >30 s, a dead host in each, `log stream` for `CPM Health Monitor`; with the filter there should be no `timeoutElapsed` for the error pages. - **Integration test (28–29 Oct):** `macOS/IntegrationTests/Tab/CPMErrorPageMonitoringTests.swift` (added to both Integration Tests targets in the pbxproj). Real `Tab` + `WKWebView` + `TestSchemeHandler` failing with `NSURLErrorCannotFindHost`; the tab gets a stub `WebExtensionManaging` whose health monitor records events. Asserts the monitor sees `started:other`, `failed`, then `started:error_page`, and the error page finish for the failed URL arrives after it (the real macOS path: `Navigation` alternate load → `.errorPage`). `build-for-testing` of scheme `macOS Integration Tests` succeeded and SwiftLint strict is clean; **not run locally** (integration tests are left to CI, no host windows). Without the macOS mapping the second start would be `started:other` and the test would fail; that was not observed, only reasoned. +- **Integration test run locally (29 Oct), correction of the line above:** with the signed Debug build (dev identity, entitlements present), `macOS Integration Tests` → `CPMErrorPageMonitoringTests` **passes** (1 test, 0 failures). Negative control with the macOS mapping removed from `PrivacyDashboardTabExtension.cpmMessagingNavigationKind`: the same test **fails** in the real app stack, with the monitor receiving `["started:other", "failed", "started:other", "committed:https://testhost.com/", "finished:https://testhost.com/"]`, i.e. the error page is reported as an ordinary navigation of the failed https URL (this is the false positive, observed in the app's own `Tab`/`Navigation` path, not only in the harness). The mapping was restored afterwards. Note for running locally: do not build with `CODE_SIGNING_ALLOWED=NO`; the host app then lacks the keychain entitlement (`-34018`) and macOS asks for keychain access.