diff --git a/.gitattributes b/.gitattributes index 452030b1bf..b3c47cd11a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,6 @@ package-lock.json binary front_end/ui/visual_logging/KnownContextValues.ts merge=union # Automatically normalize line endings (to LF) for all text-based files. * text=auto eol=lf + +# Unified diff context includes single-space blank lines and may end on one. +patches/chromium/**/*.patch whitespace=-blank-at-eol,-blank-at-eof diff --git a/.gitignore b/.gitignore index d99e00ce29..3697c67371 100644 --- a/.gitignore +++ b/.gitignore @@ -61,5 +61,8 @@ test/perf/.generated # Dependencies node_modules/ **/.idea/ +# Ephemeral public endpoint/key; regenerate for each temporary cloud test. +/config/updater/macos-cloud-test.generated.gni +**/__pycache__/ node_modules/** -eval-logs/** \ No newline at end of file +eval-logs/** diff --git a/BUILD.gn b/BUILD.gn index 29ffe1b5d5..2c6865dc78 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. import("./config/gni/devtools_grd_files.gni") + import("./config/gni/devtools_image_files.gni") import("./front_end/emulated_devices/optimized/optimized_images.gni") import("./scripts/build/ninja/copy.gni") @@ -11,6 +12,13 @@ import("./scripts/build/ninja/vars.gni") import("./scripts/build/typescript/typescript.gni") import("./third_party/blink/public/public_features.gni") +if (is_mac && build_with_chromium) { + group("browser_operator_update_qualification") { + testonly = true + deps = [ "scripts/updater/native:browser_operator_update_verify" ] + } +} + #------------------------------------------------------------------------------- devtools_frontend_resources_deps = [ diff --git a/config/chromium-autoupdate-cloud-test-mac-arm64.gn b/config/chromium-autoupdate-cloud-test-mac-arm64.gn new file mode 100644 index 0000000000..8e99e077e7 --- /dev/null +++ b/config/chromium-autoupdate-cloud-test-mac-arm64.gn @@ -0,0 +1,7 @@ +# Ephemeral cloud qualification only. Generate the HTTPS endpoint/public key +# with scripts/updater/configure_cloud_test.py before invoking the builder. +import( + "//third_party/devtools-frontend/src/config/chromium-release-mac-arm64.gn") +enable_updater = true +enable_update_notifications = true +browser_operator_updater_config = "//third_party/devtools-frontend/src/config/updater/macos-cloud-test.generated.gni" diff --git a/config/chromium-autoupdate-cloud-test-mac-x64.gn b/config/chromium-autoupdate-cloud-test-mac-x64.gn new file mode 100644 index 0000000000..5a90cf9943 --- /dev/null +++ b/config/chromium-autoupdate-cloud-test-mac-x64.gn @@ -0,0 +1,5 @@ +# Intel slice of the same isolated native-updater test build. Both slices +# share endpoint, public keys, frontend resources, and official optimizations. +import( + "//third_party/devtools-frontend/src/config/chromium-autoupdate-cloud-test-mac-arm64.gn") +target_cpu = "x64" diff --git a/config/chromium-autoupdate-mac-arm64.gn b/config/chromium-autoupdate-mac-arm64.gn new file mode 100644 index 0000000000..c76635e3e5 --- /dev/null +++ b/config/chromium-autoupdate-mac-arm64.gn @@ -0,0 +1,7 @@ +# Local update qualification; never use this loopback configuration for release. +import( + "//third_party/devtools-frontend/src/config/chromium-release-mac-arm64.gn") +enable_updater = true +enable_update_notifications = true +browser_operator_updater_config = + "//third_party/devtools-frontend/src/config/updater/macos-local-test.gni" diff --git a/config/chromium-release-mac-arm64.gn b/config/chromium-release-mac-arm64.gn new file mode 100644 index 0000000000..86851a54ba --- /dev/null +++ b/config/chromium-release-mac-arm64.gn @@ -0,0 +1,26 @@ +# Shipping optimization settings for the Browser Operator Chromium fork. +# Official optimization is independent of Google branding and code signing. +is_official_build = true +is_debug = false +is_component_build = false +dcheck_always_on = false +is_chrome_branded = false +enable_updater = true +enable_update_notifications = true +browser_operator_updater_config = + "//third_party/devtools-frontend/src/config/updater/macos-production.gni" +chrome_pgo_phase = 2 +symbol_level = 0 +blink_symbol_level = 0 +v8_symbol_level = 0 +enable_dsyms = false + +# Bound linker memory and disk use on the local 16 GB Mac. +use_thin_lto = false +use_remoteexec = false +use_siso = false +use_system_xcode = true +target_cpu = "arm64" + +devtools_bundle = true +devtools_skip_typecheck = false diff --git a/config/chromium-release-mac-x64.gn b/config/chromium-release-mac-x64.gn new file mode 100644 index 0000000000..b40ac6bc44 --- /dev/null +++ b/config/chromium-release-mac-x64.gn @@ -0,0 +1,5 @@ +# Intel slice of the same production release and updater trust roots. +import( + "//third_party/devtools-frontend/src/config/chromium-release-mac-arm64.gn") + +target_cpu = "x64" diff --git a/config/gni/devtools_grd_files.gni b/config/gni/devtools_grd_files.gni index a7186ea4c4..039031a56c 100644 --- a/config/gni/devtools_grd_files.gni +++ b/config/gni/devtools_grd_files.gni @@ -658,26 +658,6 @@ grd_files_bundled_sources = [ "front_end/panels/ai_chat/ui/SettingsDialog.js", "front_end/panels/ai_chat/ui/OnboardingDialog.js", "front_end/panels/ai_chat/ui/onboardingStyles.js", - "front_end/panels/ai_chat/ui/settings/types.js", - "front_end/panels/ai_chat/ui/settings/constants.js", - "front_end/panels/ai_chat/ui/settings/i18n-strings.js", - "front_end/panels/ai_chat/ui/settings/providerConfigs.js", - "front_end/panels/ai_chat/ui/settings/utils/validation.js", - "front_end/panels/ai_chat/ui/settings/utils/storage.js", - "front_end/panels/ai_chat/ui/settings/utils/styles.js", - "front_end/panels/ai_chat/ui/settings/components/ModelSelectorFactory.js", - "front_end/panels/ai_chat/ui/settings/components/SettingsHeader.js", - "front_end/panels/ai_chat/ui/settings/components/SettingsFooter.js", - "front_end/panels/ai_chat/ui/settings/components/AdvancedToggle.js", - "front_end/panels/ai_chat/ui/settings/providers/BaseProviderSettings.js", - "front_end/panels/ai_chat/ui/settings/providers/GenericProviderSettings.js", - "front_end/panels/ai_chat/ui/settings/providers/LiteLLMSettings.js", - "front_end/panels/ai_chat/ui/settings/providers/OpenRouterSettings.js", - "front_end/panels/ai_chat/ui/settings/advanced/MCPSettings.js", - "front_end/panels/ai_chat/ui/settings/advanced/BrowsingHistorySettings.js", - "front_end/panels/ai_chat/ui/settings/advanced/VectorDBSettings.js", - "front_end/panels/ai_chat/ui/settings/advanced/TracingSettings.js", - "front_end/panels/ai_chat/ui/settings/advanced/EvaluationSettings.js", "front_end/panels/ai_chat/ui/mcp/MCPConnectionsDialog.js", "front_end/panels/ai_chat/ui/mcp/MCPConnectorsCatalogDialog.js", "front_end/panels/ai_chat/ui/EvaluationDialog.js", @@ -1107,6 +1087,26 @@ grd_files_bundled_sources = [ "front_end/ui/lit/lit.js", "front_end/ui/visual_logging/visual_logging.js", "front_end/worker_app.html", + "front_end/panels/ai_chat/ui/settings/advanced/BrowsingHistorySettings.js", + "front_end/panels/ai_chat/ui/settings/advanced/EvaluationSettings.js", + "front_end/panels/ai_chat/ui/settings/advanced/MCPSettings.js", + "front_end/panels/ai_chat/ui/settings/advanced/TracingSettings.js", + "front_end/panels/ai_chat/ui/settings/advanced/VectorDBSettings.js", + "front_end/panels/ai_chat/ui/settings/components/AdvancedToggle.js", + "front_end/panels/ai_chat/ui/settings/components/ModelSelectorFactory.js", + "front_end/panels/ai_chat/ui/settings/components/SettingsFooter.js", + "front_end/panels/ai_chat/ui/settings/components/SettingsHeader.js", + "front_end/panels/ai_chat/ui/settings/constants.js", + "front_end/panels/ai_chat/ui/settings/i18n-strings.js", + "front_end/panels/ai_chat/ui/settings/providerConfigs.js", + "front_end/panels/ai_chat/ui/settings/providers/BaseProviderSettings.js", + "front_end/panels/ai_chat/ui/settings/providers/GenericProviderSettings.js", + "front_end/panels/ai_chat/ui/settings/providers/LiteLLMSettings.js", + "front_end/panels/ai_chat/ui/settings/providers/OpenRouterSettings.js", + "front_end/panels/ai_chat/ui/settings/types.js", + "front_end/panels/ai_chat/ui/settings/utils/storage.js", + "front_end/panels/ai_chat/ui/settings/utils/styles.js", + "front_end/panels/ai_chat/ui/settings/utils/validation.js", ] grd_files_unbundled_sources = [ diff --git a/config/releases/0.7.0.json b/config/releases/0.7.0.json new file mode 100644 index 0000000000..2a96ff7233 --- /dev/null +++ b/config/releases/0.7.0.json @@ -0,0 +1,10 @@ +{ + "product_version": "0.7.0", + "chromium_version": "158.0.8127.18", + "integration_repository": "BrowserOperator/browser-operator-core", + "required_merged_pr": 111, + "required_base_branch": "main", + "allowed_mergers": [ + "tysonthomas9" + ] +} diff --git a/config/updater/macos-local-test.gni b/config/updater/macos-local-test.gni new file mode 100644 index 0000000000..9aeb809712 --- /dev/null +++ b/config/updater/macos-local-test.gni @@ -0,0 +1,34 @@ +browser_operator_updater_branding = { + # Isolated loopback update qualification. Contains public keys only. + browser_name = "Browser Operator" + browser_product_name = "Browser Operator" + crash_product_name = "BrowserOperatorUpdaterTest" + crash_upload_url = "http://127.0.0.1:18158/disabled/crash" + help_center_url = "https://docs.browseroperator.io/" + app_logo_url = "http://127.0.0.1:18158/disabled/logo" + keystone_app_name = "BrowserOperatorUpdateTestSoftwareUpdate" + keystone_bundle_identifier = "com.browseroperator.autoupdate-test.Keystone" + mac_browser_bundle_identifier = "com.browseroperator.BrowserOperator" + mac_updater_bundle_identifier = "com.browseroperator.autoupdate-test.Updater" + privileged_helper_bundle_name = "BrowserOperatorUpdaterPrivilegedHelper" + privileged_helper_name = + "com.browseroperator.BrowserOperator.UpdaterPrivilegedHelper" + updater_company_full_name = "Browser Operator" + updater_company_short_name = "BrowserOperatorUpdateTest" + updater_company_short_name_lowercase = "browseroperatorupdatetest" + updater_company_short_name_uppercase = "BROWSEROPERATORUPDATETEST" + updater_product_full_name = "BrowserOperatorUpdaterTest" + updater_product_full_name_dashed_lowercase = "browser-operator-updater-test" + updater_product_full_display_name = "Browser Operator Updater Test" + updater_metainstaller_name = "Browser Operator Test Installer" + mac_team_identifier = "BN879H59CY" + updater_appid = "com.browseroperator.autoupdate-test.Updater" + browser_appid = "com.browseroperator.BrowserOperator" + qualification_appid = "com.browseroperator.autoupdate-test.Qualification" + crx_pkhash = "qnsui53Xviu1ywmZAg+21eGVqw56qScBFHZEEXdSD1g=" + legacy_service_name_prefix = "browseroperator-update-test" + update_check_url = "http://127.0.0.1:18158/service/update2/json" + updater_event_logging_url = "http://127.0.0.1:18158/disabled/events" + browser_operator_cup_key = "MIIFMjALBglghkgBZQMEAxEDggUhAOCtD1kby3G1+IbH5bcnFA3WlY+7Wmzg29488tHEZnvDQsKZPeswzazA5E2RGVkm6YB1lrXoekvJusuN7iK2OOs6InFjAsdeDnEeqW7yvQaS2bgHPsvqZZKVyQ3VPnQJdjEyqEtjiW7ga0C9bBoK5RPnLzvr0j10DZ4yGPI2VWvDKUlTayhItSYP6pIU+8djYFRC7OiL/rSFsSyRyBbnGwSO8as5tr7kLNHSUVr0Hy3S+H3p1l80u1XB8vqKKN8/9ULvkCfpXTyhj+dLrQ/WSR5exU5U+8qdaijlCPO6D9LgwstnSdpChCRMy4Bfas9sqgh4Gm1lZT6rmhJZzly4j3uoQVoC4ibsroElolm9tCyrsFKca8f6+7H5NymTpqj39YraV2TbuRmif3bNuxDOp+YQp4y2smNZMIzsay4fYVJk5IavLL78V/6FsVJBCtft4XVJCiqTgBltL2SSN85SIMyNShpFfsVvpV0n6qdJFGgugiyX2g8cKfmpFQzOSk1XAzdddeGLCxOYwNp8wK9aORioCcjs6IKn64GT3YJjOWsHF0TOZ2Wc8IJrxpFO/Tl+9PkXBz/OJwUTpbWPQPxNMLhaasLlTCVuEsy0fbwY43xDVJd+XbeaYQ+2h9xNNJgv1bc3AqIZubcpQRjbPJXFexmh76ularN04JudDg6HNXaQWCK3Vuy7VQolLKrHjVkhPezlyF442Rtp1vmKROSTkwpIuPum/F6CmidIi2phm5Nm9CFDCWoVVSpBYK5GKFIOEb1y0lC34pTWc9o67JtXxbBCBRHykV4FECVsK1JMdUULnuOfu/8RZ32UsXchbKA9VjxNcL9BcEM/z6U6F95aNBon1jPwKyLHBXANaiWQPoQoHsByZ5+R6L3Kqf8FNfLZpulcBO2aLesRZWZ+eyH+RXiJ8WoPM6pmjcA09p74BOkPE6MCQW3VuCqg8bXjbyaw8Gs8va8oIb5zi093H3xvhckOlKJGgcxqXdMMJ/F5yezM//kppFs6LtG4AZXJvUR9KTpa8ZK7VNi/gd/9NfKjMJ6FmTf/mLfSant1BBOcEPJCyDhNOJzWSKAHi6/cJVSzXEgqqk5GMPzNlJsA5Q35GKAsko/TUVWaGmqk04Zw/LWDEEBHf5+qmfU9hQeBA/SDFLzvVLueLofsU6tV5xGS+l8fTsOfWj4g71a6j851UPAxPIo5MG7Pb3svb5q4POPIZeQ2XztKtr8682055dWCaIWsqKFTfme8nQRwpN2cxBxnXAaBuPvVrTDUS52QKRDoERbAvMvakN2k0pTmD7ERTQQbtEFCYeV6wcae3keKFCCI69Sm6vs+K8+4Uilzjq5z2rWnAleE6Nm9lN+SnfY1XuUkByyr0Urjf5nHKfQRp2/+9lf9QsDHwVdNH2qIfP5V5UR7/GXhfYIn6KRHQPUtV8lg3HEHXmiACBFRmckvNmEAafHzWmLe7Zgx5FynjFRyMfC21p4/1Ci2WKRdahj75X4VwA1wgziXx7Uz2WP+Fs+XDmJ8KR2yznN9Uamfha7WmA8vxgbSzEea0EnrrSimBeJazfxeTb8s6a9Z2Ia0SXWv07qLbQe0kuBBNhLDWmFGZauaoPnXvJva48uH+J2XqVrCwAEQJL/iqjAp3T7ic8XG44+s0KWzpEuc1weHujD76cLMfwlorxnebQ9HZS7rhIzZ/2/fO7LKOw8tRlsoqxv0jGotfX6O9LHHc6HT6VYwQeEtqthaFi03AqMHEGx8A/M=" + browser_operator_cup_key_version = 1 +} diff --git a/config/updater/macos-production.gni b/config/updater/macos-production.gni new file mode 100644 index 0000000000..f7e9129075 --- /dev/null +++ b/config/updater/macos-production.gni @@ -0,0 +1,36 @@ +browser_operator_updater_branding = { + # Production macOS update identity and public trust roots. Private keys stay + # outside Git. + browser_name = "Browser Operator" + browser_product_name = "Browser Operator" + crash_product_name = "BrowserOperatorUpdater" + crash_upload_url = "https://updates.browseroperator.io/disabled/crash" + help_center_url = "https://docs.browseroperator.io/" + app_logo_url = "https://updates.browseroperator.io/disabled/logo" + keystone_app_name = "BrowserOperatorSoftwareUpdate" + keystone_bundle_identifier = "com.browseroperator.Keystone" + mac_browser_bundle_identifier = "com.browseroperator.BrowserOperator" + mac_updater_bundle_identifier = "com.browseroperator.Updater" + privileged_helper_bundle_name = "BrowserOperatorUpdaterPrivilegedHelper" + privileged_helper_name = + "com.browseroperator.BrowserOperator.UpdaterPrivilegedHelper" + updater_company_full_name = "Browser Operator" + updater_company_short_name = "BrowserOperator" + updater_company_short_name_lowercase = "browseroperator" + updater_company_short_name_uppercase = "BROWSEROPERATOR" + updater_product_full_name = "BrowserOperatorUpdater" + updater_product_full_name_dashed_lowercase = "browser-operator-updater" + updater_product_full_display_name = "Browser Operator Updater" + updater_metainstaller_name = "Browser Operator Installer" + mac_team_identifier = "BN879H59CY" + updater_appid = "com.browseroperator.Updater" + browser_appid = "com.browseroperator.BrowserOperator" + qualification_appid = "com.browseroperator.UpdateQualification" + crx_pkhash = "eT50GJwVvKurEDTZINRdWA3Q+YMkPKfUig59c7PlgJ8=" + legacy_service_name_prefix = "browseroperator-update" + update_check_url = "https://updates.browseroperator.io/service/update2/json" + updater_event_logging_url = + "https://updates.browseroperator.io/disabled/events" + browser_operator_cup_key = "MIIFMjALBglghkgBZQMEAxEDggUhAJ5fCYsg52OZB45CMMREjLAxM+zlQO8+biT9QJt3pda+L074PtaoyvhODcfG1QIIyySdAD9tJKYE/PBsPGj1i8y90DnhRGhtBfMx6E4Prn3sCg5HyU/XhzXjG0O2SXiVfl1XtVf0VWMZsYpJKQjqRwR1niew2nbu4uppchlUsx2qteuPS2J7lWfetS8MwdiqghEQVHMF6X7K2Yta+QzYJ648tMKr68OL7YNAwYSzrzVSiCyJsCcmmA7Il952H1ndeuZPeMiZu9Rvjiq/Z0zIopsB7thyd2hic70zufGEWQ38x+xMpXOfw08vKnhVRmM4zPB9NjTTVo7Mcj5FqbufYZBHML4CltE8GRjWbjlKDysrdwtYhxFj3KtB90zWJb96bOQB7BCyPZubuN26enQtlsh6fqmMCJ6BlwILdZ/IaahirNep4sb8GJEbG3I5t7JPttEv6UjIO2bkJ4fqejZ0mRJOhIeAAK1EePFpnEsGOn+1CD+dTEMHUkel0cfy64VpobA7JlodU7ofKpn7h00N+FOgVk532+fs4X+z+Rq1WACLmBjrnab+cVLpDf3AsOCIiR6ZiJxBcICbJDjAtoAVG5OO0fyARVwt5bi/9fwfYOEyhDGrgCLAYOnG7xMG1eEvALuVXRgi4hqjpBWj6hfetsk3RUEIW+w5LyHki/sedT+4EOlfsX5l3jhacFWoERFNerX1urV/P89z8GRFjSeGz2rSbf0dz2/xhNoZyroUtF3m6LJZswdOsCNjXbkvOHD6m8EAAWFhKuc9IVDDyB2v6vN3JdnK0Voek3fKp2/tzxTlBp6Gpa0JZ5VgCa5ZdVrLT3l86GsNfmm9BHCla9yMUtJqqeSQf2+5tEVyhycSp1+3nCbuaK1OZkCqhExAFXQEA4dZNuwfHllhgGuO04so1f59Eom7BJ/C+Mbt/cOrervhEcuHYzMOc5TZX8FkEnbegdFOW8l6/Qc+gKEoGc/mL1zqC5zuYPAgh9js1jeru5KBt/31DdaJS/oDt42YY3YFT7l0VON3uvQZjVI8ZE4ABzgr5I3cUGIVn0SKOOPleuBhZHtmtoMeJhXWHAtE/rhsNXd5vAH4O1ivW7fFHoKKOIM6/tVTbPd2imjgUlWofdUT1Hm/BAxRYYjq14Vq9qzK1sM+LY9JGh32vVbOnCNV5R9tuCwZLLwwykdfa7CFVbIOkpcNcO0zVQXWQ2XB/W3uWIp20PfnuXmSVidkCh+UncrsinRpuZBmD55G2HfYjwyC7pLCSdR6RFlOA/EbGc+tIffv5YhHymqXC0W/vH8+dfk3FqABOnGxY19HzTg2XIobUvxAFXMhgADSGgfRAxtXmgTSobjgnxqn1nVRziiGAA110NbDcRmq0HvsO80zOZrfTcwctBKv0J1DXtmOc38RnD7zLyInsx1LSrWuIe8hrLHY73Q26G7nqjUJzbt5HXp486AGaVwbwzfiHMzqT00V1Jff+xQcpRkaaGhdA59RigNB2UnqoxwG/NMcnbZ0J6hrgBoEqS8qJe6pBzzVwACcfNxHXP7uwIcyHSLGF4tmeNl6lb6rRYWVmc9JDEe3pQNLJ2rE/bHY/3XyhfoiTcsi2SEmjsXKg7FXolNKX7aZByGD+9DWN8KIZ+zEei0jUoeqelXqCL2gFz1XoI0sn8uQ2Akgowuw0QgOuBZnF/SGC9Tp006zZ4IVS7dSKuG+u6f4k5XrYh6JD1OpS4hnXS6QXA9EGqN7X6SiDSCnZqP0LD0=" + browser_operator_cup_key_version = 1 +} diff --git a/docs/chromium-158-distribution-release.md b/docs/chromium-158-distribution-release.md new file mode 100644 index 0000000000..98922796b3 --- /dev/null +++ b/docs/chromium-158-distribution-release.md @@ -0,0 +1,187 @@ +# Chromium 158 shipping DMG + +Updated 2026-11-07 (America/Los_Angeles). + +Automatic-update qualification started on November 8; see +[the macOS 158-to-159 test notes](chromium-macos-autoupdate-158-to-159.md). +The active source checkout is now genuine 159 Dev for that isolated test. +The signed 158 manual-update artifact and installed app described here remain +unchanged. Upstream 158.0.8127.18 is Beta; official optimization and signing do +not make it an upstream Stable release. + +Target: **158.0.8127.18 ARM64**, Chromium source +`6449d9f9a6a906edff724b7b220199b3fde4615c` on +`codex/browser-operator-158`. This follows the local build and readiness audit +in [chromium-158-release-upgrade.md](chromium-158-release-upgrade.md). + +## Product and build changes + +- Settings navigation: **Profiles** and **AI in Browser Operator** replace the + remaining mismatched labels. Actual Google-service names and Chromium + attribution are preserved. +- With `enable_updater=false`, the macOS backend reports disabled with an + explicit **Automatic updates are not enabled. Install new Browser Operator + releases manually.** message. The UI displays this message without an error + icon, spinner, or Google update-error link. Empty disabled messages retain + upstream's hidden behavior; actual failures retain their error presentation. +- These changes and the WebUI regression test are in the sixth reviewed patch: + `patches/chromium/158.0.8127.18/06-release-branding-and-manual-updates.patch`. +- A seventh patch updates product-facing Chromium messages (including native + accessibility/window titles) and macOS file-type descriptions. It preserves + attribution, URLs, example placeholders, service names, and identifiers. + All seven patches and both toolbar icons pass fresh-source application and + reverse checks. +- Shipping settings: `is_official_build=true`, `is_debug=false`, + `is_component_build=false`, `dcheck_always_on=false`, `chrome_pgo_phase=2`, + bundled DevTools and full TypeScript checking. ThinLTO stays off to bound + memory on the 16 GB Mac. +- The build runner downloads the exact ARM64 Chromium PGO profile and V8 + built-in profiles pinned to this checkout, without running gclient across + the external frontend symlink. It builds `chrome` **and** + `chrome/installer/mac`, keeps six compile jobs, and stops below 5 GiB free. +- Full official frontend preflight **passed**, including TypeScript and GRD + resource validation. It exposed two unreachable nullable-button statements + in onboarding; those statements were removed. Type checking remains enabled. + +## Release automation + +Build: + +```sh +python3 scripts/build_chromium_release.py \ + --chromium-src /Users/tyson/chromium/src --jobs 6 --min-free-gib 5 \ + --log /private/tmp/browser-operator-158-shipping-build.log +``` + +Sign, notarize, package, and verify the final DMG: + +```sh +python3 scripts/package_chromium_release.py \ + --chromium-src /Users/tyson/chromium/src \ + --output /Users/tyson/chromium/releases/158.0.8127.18-arm64 \ + --keychain-profile tthoma9 +``` + +The packaging runner refuses stale build products or non-shipping settings, +selects a valid Developer ID Application identity, and signs a staged copy via +Chromium's generated nested-signing pipeline. It does not use development +signing flags or debug-attach entitlements. It notarizes/staples both the app +and DMG using the existing keychain profile. + +The pre-notarization Gatekeeper check is deferred until after notarization; +strict final app and DMG Gatekeeper checks are mandatory. The DMG uses an APFS +adapter (`scripts/chromium_apfs_dmg.py`) with a visible **Applications** shortcut. +The adapter checks the mounted app's strict signature before the DMG is signed +or submitted. The runner validates +signatures, hardened runtime, team identity, tickets, DMG integrity, ARM64, +and functional tests launched from the mounted final DMG. It also runs the +functional checks before signing to catch product/test failures before an +Apple submission. It saves a checksum +manifest, browser logs, About-page screenshot/status regressions, and actual +bundled AI tool results. Existing release output is never deleted or silently +overwritten. + +## Pipeline reviewed + +See [chromium-macos-release-pipeline.md](chromium-macos-release-pipeline.md). +The existing `test-github-pipeline` checkout on `feature/mac-sign-notarize` +contains the Mac build/sign/notarize scripts; its original workflow scheduled +Linux and Windows only. The older `feature/mac-build` branch does +have a Mac job on `tysonthomas9/macos`, but its optional deep-signing and DMG +steps do not include notarization. Added `mac-release-shipping.sh` and a local +opt-in `run_macos_release=true` workflow using that existing runner. Its YAML +structure and shell steps passed local validation. No remote workflow was +changed and no CircleCI job was triggered; cloud execution remains untested. + +## Completed artifact and verification + +**Completed 2026-11-07.** Final ARM64 DMG: + +`/Users/tyson/chromium/releases/158.0.8127.18-arm64/artifacts/BrowserOperator-158.0.8127.18-arm64.dmg` + +SHA-256: +`9c05a935c6112b6636587660f21a83a0068f6b4a4982ee35ba2e6e5a7d930a74` + +The native build resumed incrementally after the requested stop at +44,336 / 45,937 actions. The resumed pass completed successfully (exit 0), and +Ninja then reported no work for both browser and packaging targets. + +- Full official frontend TypeScript/resource preflight and native build passed. +- Pre-sign bundled JavaScript execution, page content, screenshot, branding, + native manual-update message, and disabled/failed WebUI regressions passed. +- Developer ID nested signing, secure timestamps, hardened runtime, intended + team identity, and absence of debug-attach entitlement verified. +- Apple accepted the app submission + `12131f12-b3d9-4c2e-9e0f-6491fd3c0c9d` and APFS DMG submission + `43f4e798-0229-4e9d-a0d9-e4124970633a`. App and DMG tickets were stapled and + validated. Both final app and DMG were accepted by Gatekeeper as + **Notarized Developer ID**. +- Final DMG checksum, visible Applications shortcut, mounted-app strict/deep + signature, ARM64 architecture, and mounted-app functional/About regressions + passed. The release manifest was written only after those checks succeeded. +- Native visual/accessibility testing launched the exact final DMG app through + macOS Launch Services with an isolated disposable profile. The AI toolbar + opened the panel; onboarding Skip, provider settings/provider picker, model + picker, Close Chat Window, toolbar reopen, and toolbar toggle-close passed. + About visually showed Profiles, AI in Browser Operator, Official Build, and + the manual-update message without the former error. The owned test app was + closed and the volume detached afterward. +- Provider conversations were **not tested** because credentials were absent. + The existing frontend 0.5.0 separately advertises its core 0.6.0 release; + that frontend banner is distinct from the native browser updater and was + retained. Automatic browser updating remains intentionally disabled. +- Subsequently installed **158.0.8127.18** into + `/Applications/Browser Operator.app` at the user's request. The installed copy + passed strict/deep signature verification and Gatekeeper before replacement. + Previous app 144 was retained at + `/Users/tyson/chromium/browser-operator-backups/installed-144-20261107-154355/Browser Operator.app`. + Opened the installed app normally and confirmed the profile picker was visible + for the user to select a profile. `installation-report.json` records the paths. + +Reports, screenshots, signatures/Gatekeeper evidence, and the checksum manifest +are in `/Users/tyson/chromium/releases/158.0.8127.18-arm64/`: +`release-manifest.json`, `gatekeeper-app.txt`, `gatekeeper-dmg.txt`, +`pre-sign-verification/`, and `verification/` (including `desktop-report.json`). + +Build/preflight logs: + +- `/private/tmp/browser-operator-158-official-frontend.log` +- `/private/tmp/browser-operator-158-shipping-build.log` +- `/private/tmp/browser-operator-158-shipping-resume-runner.log` +- `/private/tmp/browser-operator-158-package-apfs-runner.log` +- `/private/tmp/browser-operator-158-final-verification.log` +- Release directory `sign-and-notarize.log` + +## Issues fixed during distribution validation + +Apple initially returned HTTP 403 for an outstanding developer agreement. The +account holder accepted it; authentication and the final submissions succeeded. + +The first legacy HFS DMG was accepted by Apple but failed mounted-app strict +signature validation. The HFS hybrid path introduced `com.apple.FinderInfo` +metadata on `app_mode_loader` after signing. That artifact is **not releasable**; +its diagnostics are preserved in +`/Users/tyson/chromium/releases/158.0.8127.18-arm64-failed-hfs-finderinfo`. +A signed-helper APFS regression passed. The shipping pipeline now uses the APFS +adapter and checks the mounted app before DMG submission, as well as afterward. + +The hardened-runtime verifier originally expected the literal `(runtime)`; +macOS reports combined flags such as `(kill,restrict,library-validation,runtime)`. +It now checks the individual flags. The valid APFS DMG was verified again using +`--verify-existing`, without rebuilding, signing, or uploading it again. + +The About helper's embedded JavaScript newline escaping was corrected before +its first shipping-app run, and embedded-evaluation errors now surface directly. + +## Future build and verification recovery + +Use the same build command for incremental work; completed unchanged outputs +remain reusable. Do not clean `out/Release` or sync across the external frontend +symlink. An interrupted compile/link restarts only its own unfinished action. +Use a new, empty output directory for each new release. + +If packaging has already produced a signed/stapled DMG but final verification +was interrupted before its manifest was written, add `--verify-existing` to the +packaging command. This resumes all final checks without signing/uploading +again. Existing completed manifests are never overwritten. Native visual +checks remain an explicit final step, recorded separately in the desktop report. diff --git a/docs/chromium-158-production-universal.md b/docs/chromium-158-production-universal.md new file mode 100644 index 0000000000..3b7b6a9603 --- /dev/null +++ b/docs/chromium-158-production-universal.md @@ -0,0 +1,218 @@ +# Chromium 158 production macOS builds + +The requested engine is **158.0.8127.18**, source +`6449d9f9a6a906edff724b7b220199b3fde4615c`. This upstream tag is Beta; +Browser Operator's own `stable` updater channel is a separate release policy. +The build combines the native updater/universal support and the two targeted +DevTools security backports from PR #106. The AI chat tree is preserved. + +Standard release configuration now enables auto-update by default. Packaging +also expects it by default; `--manual-updates` is an explicit escape hatch for +historical artifacts. Both architectures use official optimization, PGO phase2, +full frontend type checking and bundled DevTools. ThinLTO is disabled on the +16GiB build host. Total native compile concurrency remains six jobs; every +build stops below 5 GiB free. Intel output/config defaults are distinct from ARM. + +## Permanent update identity + +- Endpoint: `https://updates.browseroperator.io/service/update2/json`. +- Backend: Cloud Run `browser-operator-omaha`, `us-west1`, project + `browseroperator-1746729957294`, with direct custom-domain mapping. +- DNS: CNAME `updates` to `ghs.googlehosted.com`, DNS only. Google-managed TLS. + Direct Cloud Run mapping is a preview feature selected by the owner after + comparing alternatives; Firebase is not in the final request path. +- Browser ID: `com.browseroperator.BrowserOperator`. +- Updater ID: `com.browseroperator.Updater`, separate from qualification helpers. +- Public configuration: `config/updater/macos-production.gni`. +- CUP public SPKI SHA256: + `6d772945027df18dd0859e5d607f6157d2218c2686e151e21a3ab443240f9ce7`. +- CRX publisher public SPKI SHA256: + `793e74189c15bcabab1034d920d45d580dd0f983243ca7d48a0e7d73b3e5809f`. + +The CUP private key is held in Secret Manager, secret +`browser-operator-production-cup`, pinned version 1. The runtime service account +can access only that secret. The package-signing private key remains on the +signing Mac, outside repositories. Do not regenerate these keys for a new +browser version: existing clients pin their public trust roots. A backend move +can retain the hostname and keys without rebuilding clients. + +The initial stable catalog is deliberately empty. A production 159 release must +be built with these same production identities, signed/notarized, packaged and +qualified before offering it to 158 clients. Earlier 158-to-159 qualification with +test identities is not a substitute for the production rollout check. + +## Build, freeze and merge + +Use the architecture-specific production configs and output directories: + +```sh +python3 scripts/build_chromium_release.py --chromium-src /path/to/chromium/src \ + --target-cpu arm64 --build-dir out/Release_158_arm64 --log /tmp/158-arm64.log +python3 scripts/freeze_chromium_release.py --chromium-src /path/to/chromium/src \ + --build-dir out/Release_158_arm64 --output /path/to/new/arm64-input + +python3 scripts/build_chromium_release.py --chromium-src /path/to/chromium/src \ + --target-cpu x64 --build-dir out/Release_158_x64 --log /tmp/158-x64.log +python3 scripts/freeze_chromium_release.py --chromium-src /path/to/chromium/src \ + --build-dir out/Release_158_x64 --output /path/to/new/x64-input + +python3 scripts/merge_chromium_macos.py --chromium-src /path/to/chromium/src \ + --arm64 /path/to/new/arm64-input --x64 /path/to/new/x64-input \ + --output /path/to/new/universal-input +``` + +The builder includes updater, packaging and native crypto-verification tools +automatically. Freezing requires every target current, verifies actual Mach-O +slices and preserves a file inventory. Native and frontend Git revisions, +tracked changes, untracked source/assets, dependency repository states and +resolved updater trust roots are recorded. Both slices must match that +provenance, not just configuration filenames. + +Chromium's universalizer merges the browser, embedded/standalone updater and +updater utility. Architecture-specific snapshots survive. All shipped Mach-O +files must have both slices; conflicting non-code resources fail. The only +architecture-specific signing-tool exceptions are `dmg_tool` and `hfs_tool`, +retained from ARM for execution on the signing host, outside the shipped app. + +## Sign, notarize and qualify + +```sh +python3 scripts/package_chromium_release.py --chromium-src /path/to/chromium/src \ + --frozen-input /path/to/new/arm64-input --architecture arm64 \ + --output /path/to/new/158-arm64-release --keychain-profile tthoma9 +python3 scripts/package_chromium_release.py --chromium-src /path/to/chromium/src \ + --frozen-input /path/to/new/universal-input --architecture universal \ + --output /path/to/new/158-universal-release --keychain-profile tthoma9 +``` + +The existing nested Developer ID signing, app/DMG notarization and stapling, +APFS packaging, strict signatures, hardened runtime and Gatekeeper checks are +retained. Each final DMG is mounted read-only and its signatures/tickets are verified. +Functional/About/updater checks run from a writable install copy of that exact +app with disposable profiles. Chromium deliberately refuses updater registration +on read-only mounts; a DMG launch is not a valid installed-updater test. Universal validation requires Rosetta on Apple Silicon +and runs both CPU slices. macOS's public proc API verifies that browser and +renderer processes actually use the requested CPU. Physical Intel hardware +qualification remains distinct from Rosetta execution. + +Only a completed `release-manifest.json` establishes a verified output. Read +its per-CPU functional results, updater-test status, trust/provenance and DMG +checksum. Provider conversations require credentials and are not covered by +the local execution/page-content/screenshot tool checks. Use +`--verify-existing` to resume final validation of an already signed/stapled DMG. +Existing manifests and release inputs are never silently overwritten. + +## Update packages and CircleCI + +`package_macos_update.py` accepts verified ARM64/universal production releases. +It requires the matching frozen input and compiled publisher pin, validates +Apple trust, round-trips the archive through Chromium's own unzip, and verifies +the resulting CRX3 with the native verifier. Use the production keys outside Git. + +`publish_macos_release_update.py` uploads the DMG, authenticated CRX and metadata +to `BrowserOperator/browser-operator-releases`. Tags are +`macos-VERSION-arm64` or `macos-VERSION-universal`; every remote asset's size and +SHA256 must match before publishing. Existing published tags/assets are never +clobbered. The existing test publisher retains its separate prerelease mode. +Production publication requires `--build-input` pointing to the same frozen +input used to sign the release. Its manifest digest and inventory must match; +the native verifier rechecks the CRX signature against the compiled publisher +pin before contacting GitHub. Uploads and publication target the verified +release ID, and ambiguous duplicate drafts are rejected. + +The prepared ARM64 CircleCI entrypoint always builds/signs the updater. +Production publication is explicitly selected with `publish_release_update=true` +and `update_release_tag=macos-VERSION-arm64`, using protected runner key paths. +Test and production publication/configurations cannot be mixed. The new flags +are opt-in; no remote pipeline execution or publication is implied by local +build/testing. Universal merging/signing uses the commands above. + +Publishing assets does not activate a catalog. After a real native upgrade is +qualified, deploy the reviewed `catalog-github.json` as the Cloud Run image's +stable catalog and promote that immutable image. Universal payloads can serve +both Mac CPU types, preserving universal installations; architecture-specific +catalog entries must not overlap. The service rejects wrong channels, ambiguous +architecture entries, non-GitHub production download origins and downgrades. + +## Qualification isolation and retries + +Native updater checks require a clean dedicated macOS user namespace. Packaging +refuses to replace a pre-existing production or qualification controller. The +smoke test can install its own signed helper; it uninstalls only that newly +created helper, verifies removal of its wake agents, and preserves diagnostics +in the private release evidence. A successful authenticated check may report +up-to-date, downloading or relaunch required; this does not claim an upgrade +installation passed. The feed can therefore advance without invalidating +verification of an older signed release. + +Public release assets contain a reduced provenance manifest: detailed local +untracked filenames and absolute symlink targets stay in private audit evidence, +represented publicly by digests. The frozen-input manifest remains private. + +Every attempt uses a new output and frozen-input directory. If CI fails after +freezing, preserve the completed input and diagnostics. To retry signing, invoke +the packager directly with that verified `--frozen-input` and a new `--output`. +If a final signed/stapled DMG already exists, use `--verify-existing` with its +original output to resume verification. Never delete or overwrite an accepted +release to make a retry pass. The CircleCI wrapper itself starts fresh and +requires a new `RELEASE_OUTPUT` for a full rerun. + +Production promotion accepts only universal payloads covering both CPU types. +Native update requests expose OS architecture, which cannot distinguish ARM64 +and universal installations on Apple Silicon. Both installers receive future +universal updates, preserving Intel compatibility. ARM-only catalog candidates +may accompany download assets but must not be activated in the stable service. + +Each verification attempt gets a fresh evidence subdirectory; retrying never +truncates the previous smoke test or collides with its retired controller logs. +The release manifest records the successful evidence directory. + +DMG-to-install copying crosses volumes and may require a full copy even when +`cp -c` is requested. Successful test installations are removed after helper +cleanup; failed attempts retain the app for diagnosis. Output-volume free space +is checked independently. Detailed verification evidence remains private. + +## Verified release checkpoint, 2026-11-10 + +Both 158.0.8127.18 production DMGs passed Developer ID signing, app/DMG +notarization and stapling, Gatekeeper and image-integrity checks. The ARM64 +release passed its native execution; the universal release passed both ARM64 +and translated x86_64 browser/renderer execution, bundled AI tools and native +About update checks. Both update candidates passed Chromium archive round-trip +and pinned-key CRX verification. Physical Intel hardware testing and provider +conversations remain unqualified. Chromium warns that Rosetta execution is not +a maintained mode; translated coverage does not replace hardware qualification. + +Cold Rosetta startup exceeded the original 30-second test limit. The Intel +startup probe now allows a bounded 180 seconds; the complete test then passed. +No security check or CPU assertion was bypassed. Visible toolbar verification subsequently passed after a manual Finder +installation and Guest-mode launch; desktop Terminal access was not needed. + +The permanent stable feed is empty. A production 159 build, real native upgrade +qualification and explicit catalog promotion are still required before clients +receive 159. Local verified candidates have not been published to GitHub in this +run. CircleCI scripts/YAML were checked, but no remote CI execution is claimed. +Claude's final focused static review found no introduced blockers. The release, +CircleCI and private Omaha changes remain separate review PRs. + +## Manual installation and private distribution + +The verified universal app was manually copied from the final DMG into +`/Applications/Browser Operator.app`, preserving the prior app in a local backup. +Its signature, stapled ticket, both CPU slices and main executable/Info.plist +match were rechecked. The native profile picker opened; Guest mode kept the +existing user profiles unselected. AI toolbar open/close/reopen, welcome Skip, +provider settings and the model picker all rendered correctly. Native About +showed 158.0.8127.18 (Official Build) and up to date. The real production updater +registration now points at that installed app and version, and remains enabled. + +Observed follow-ups: the AI panel still shows a separate legacy frontend 0.6.0 +release banner, and the initial Guest new tab showed a missing Google API keys +notice. Neither blocked toolbar testing. No provider credentials were entered +and no provider conversation was sent. + +At the owner's request, both signed DMGs, reduced verification manifests and +SHA256SUMS were uploaded as release assets to the existing private Omaha +repository. GitHub asset sizes and SHA256 digests were confirmed before +publishing the private release. These are signed-in manual downloads; the +public updater repository and the empty production catalog were unchanged. diff --git a/docs/chromium-158-release-pr-audit.md b/docs/chromium-158-release-pr-audit.md new file mode 100644 index 0000000000..9adc0cb824 --- /dev/null +++ b/docs/chromium-158-release-pr-audit.md @@ -0,0 +1,71 @@ +# Chromium 158 release input and PR audit + +The release input audit found branding output that was used locally but not +fully represented by the eight original native feature patches. Patch10 now +captures the exact residual text changes across36 native files. It does not +change the working browser's behavior; it makes its existing branding reviewable +and reproducible. The generated `components/resources/sample_credits.html` is +excluded: Chromium generates license credits from the pinned dependencies. + +All74 selected theme inputs match the clean, tracked BrowserOperator/build-script +checkout at c236edd3378906aa9239126707c26597b607698b. Their source/destination paths +and SHA256 values are recorded in `patches/chromium/158.0.8127.18/branding-assets.json`. +The patch helper validates that pinned source and each asset before applying. +No opaque duplicate asset payload or generated license HTML is added to the PR. +Use `--branding-source /path/to/build-script` on a fresh Chromium checkout. + +Coverage: + +- Chromium integration: PR102; signing/packaging: PR103; native updater: PR104. +- Universal support: PR105 and PR108; security backports: PR106. +- Native AI updater entry and product0.7.0: PR109. +- Exact native branding/asset coverage: this separate stacked audit PR. +- CI preparation/publication: test-github-pipeline PR7 and PR8, with the Windows + build changes reviewed separately before its candidate pipeline is started. +- Cloud Run backend: private Omaha PR1; no credentials/private keys are committed. + +The inherited AI snapshot08a6cc is an ancestor of the head reviewed in merged +PR76, despite its squash-merge ancestry. It is not an unreviewed local AI change. +The current component stack starts from a review-base branch rather than main; +release integration must land the reviewed code in main before publication. +If merging newer main changes alters product inputs, candidates must be rebuilt +and requalified from the resulting source. The release gate must reject stale +artifacts rather than merely trusting that a PR was merged. + +Local build queues, signing invocation logs, GUI launch helpers and notarization +account references remain in the private release work directory. They call the +reviewed scripts and are not shipped product source. Recovery `.rej` files, +unused branding variants, stock frontend backups and omitted benchmark checkouts +are not browser runtime modifications. Node_modules changes from the original +checkout remain outside these review branches. + +The owner requires all publishing held until merge. The existing private158 +release remains unchanged while product0.7.0 candidates are built and notarized. +After merge, public v0.7.0 in browser-operator-core will expose the Mac DMGs to +legacy users, with private copies retained in Omaha. Native Omaha compares the +four-part Chromium version: same158.0.8127.18 rebuilds require the legacy notice +and manual bootstrap; a genuine159 native offer is separately qualified. + + +Product0.7.0 main integration is PR111 (base main). The final integration +restores main's AI files untouched by release work, removes duplicate AI +settings/resource entries, and compiles both158 architectures. Its frozen +manifest records the complete frontend Git tree; publication requires PR111 +merged into main with those exact trees. A later product change requires +a rebuild. The Windows candidate is a separate CircleCI change/build and +will not publish an installer or activate a Windows update feed. + +Claude review identified developer Git-config dependence in patch assembly, +incomplete publication source coverage, asynchronous banner-test timing, and +restore recovery gaps. The integration fixes isolate Git settings, compare the +complete frontend tree, require owner merge and policy for production publishing, +poll for the native action, and retry/record baseline restoration with signal +unwinding. Volatile updater check timestamps are not claimed to be restored. +Packaging now requires the verified frozen input path for every release. + +Final signed-DMG testing caught a downstream DevToolsWindow security check +turning the AI update URL into about:blank. The reviewed native action now +invokes Chromium's fixed ShowAboutChrome command through the profile's tabbed +browser, after the same exact help alias and trusted bundled-origin checks. +Generic DevTools navigation retains both upstream security checks. The failed +ARM candidate was never published; installed updater restoration passed. diff --git a/docs/chromium-158-release-upgrade.md b/docs/chromium-158-release-upgrade.md new file mode 100644 index 0000000000..5bbf8aef1c --- /dev/null +++ b/docs/chromium-158-release-upgrade.md @@ -0,0 +1,239 @@ +# Chromium 158 release upgrade + +Channel correction, November 8: upstream identifies 158.0.8127.18 as Beta. +The earlier Stable label in this historical build record was incorrect. +Current automatic-update work is tracked in +[the macOS 158-to-159 qualification notes](chromium-macos-autoupdate-158-to-159.md). + +Target: **158.0.8127.18**, verified source tag at +`6449d9f9a6a906edff724b7b220199b3fde4615c`. + +The signed shipping-DMG follow-up is tracked in +[chromium-158-distribution-release.md](chromium-158-distribution-release.md). +The local-build results and distribution audit below are historical stages; +consult that follow-up for the current shipping settings and artifact status. + +The old 148 component build output was removed to recover roughly 7 GB, as +requested. Before removal, source changes, 117 untracked source/assets files, +build arguments, and logs were saved under: + +`/Users/tyson/chromium/browser-operator-backups/148.0.7778.56`. + +The old frontend symlink was restored to the clean stock DevTools checkout +before changing Chromium versions or running gclient. The recovery stash ID is +saved in that backup directory's `stash-revision.txt`. + +## Version-specific patches + +The five core patches have been ported to pristine stable 158 source files and +saved in `patches/chromium/158.0.8127.18`. All five pass `git apply --check`. +The series includes the two required toolbar PNG assets under `assets/`. +The toolbar callback now takes `BrowserWindowInterface*`, matching the updated +Chromium API. The original signing/notarization workaround is not part of these +feature patches. + +```sh +python3 scripts/apply_chromium_patches.py --chromium-src /path/to/chromium/src +python3 scripts/apply_chromium_patches.py --chromium-src /path/to/chromium/src --apply +``` + +The script defaults to checking, refuses unknown Chromium versions, and checks +the whole series and asset conflicts before applying. It installs the toolbar +icons and refuses to overwrite different existing icons. Fresh-source check, +apply, reverse-check, asset comparison, and conflict refusal all passed. +Use the existing upstream `smart_rebrand.py` +for branding. Merge matching logo/icon assets rather than deleting new-version +theme directories with the old asset copier. Frontend integration follows the +dependency sync, so gclient never syncs across the external frontend symlink. + +## Release configuration + +`config/chromium-release-mac-arm64.gn` is the active release configuration: +optimized non-component browser, no debug symbols/dSYMs, bundled DevTools, and +ThinLTO disabled to bound linker memory on this 16 GB Mac. This is a local +Browser Operator release build, without Google's signing or API credentials. + +## Storage-bounded dependency sync + +The original tag-based gclient invocation attempted an unbounded fetch of the +source remote. It was interrupted before proceeding. Pin the already-fetched +source **hash** and use a process-local Git wrapper, because depot_tools' +`--no-history` applies to initial clones but not every existing-checkout fetch: + +```sh +cd /Users/tyson/chromium +DEPOT_TOOLS_UPDATE=0 \ +BROWSER_OPERATOR_REAL_GIT=/Applications/Xcode.app/Contents/Developer/usr/bin/git \ +PATH=/Users/tyson/codebase/browser-operator-core/scripts/chromium_sync_git:/Users/tyson/chromium/src/third_party/depot_tools:$PATH \ +DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer \ + /Users/tyson/chromium/src/third_party/depot_tools/gclient sync --no-history --shallow \ + --revision src@6449d9f9a6a906edff724b7b220199b3fde4615c --jobs 4 +``` + +The wrapper forwards normal Git commands, adds `--depth=1` to fetches without +an explicit depth, selects exact gitlink revisions where available, and refuses +`--unshallow`. It is scoped to this command's +PATH; global Git configuration and depot_tools source are unchanged. Argument +forwarding, depth insertion, explicit-depth handling, and refusal were tested. + +The older `/Users/tyson/depot_tools` vpython client cannot parse the new +`requires-python` TOML specification and caused hook exit status 2. Use the +matching depot_tools revision bundled with 158, as shown above. The subsequent +sync and hooks completed with exit status 0. + +Final sync log: `/private/tmp/browser-operator-158-sync-current-tools.log`. + +Eight clean JetStream/Speedometer benchmark checkouts, excluded by the small +checkout configuration, were removed after recording revisions and checking +for local changes. The cleanup inventory is in the 148 backup directory. + +**Before any future gclient sync**, restore stock DevTools: the standard `src` +path is currently a symlink to Browser Operator; the synced stock 158 checkout +is preserved at `third_party/devtools-frontend/src.chromium-158-original`. +Never run gclient across the external frontend symlink. + +## Release build compatibility and preflight + +- Chromium 158's BiDi GN targets use `ts_deps`, `_sources`, and `_checked`, + which the older frontend TypeScript template lacked. Added a compatibility + layer for external consumers, preserving the frontend's legacy contract. +- Release metadata had a duplicated source list omitting ten newer AI modules. + It now derives JavaScript resources from the actual TypeScript outputs. +- GN generation passed: 32,857 targets from 5,087 files. +- Bundled frontend preflight passed all 1,360 actions, including resource checks. +- Generated GN values verified: `is_debug=false`, `is_component_build=false`, + `devtools_bundle=true`. + +```sh +cd /Users/tyson/codebase/browser-operator-core +python3 scripts/build_chromium_release.py \ + --chromium-src /Users/tyson/chromium/src --jobs 6 --min-free-gib 5 \ + --log /private/tmp/browser-operator-158-release-build.log +``` + +The runner stops its Ninja process group gracefully if free space falls below +5 GiB. Tests covered low-space interruption and compiler-error propagation. +Output: `/Users/tyson/chromium/src/out/Release`. +Runner log: `/private/tmp/browser-operator-158-release-runner.log`. + +## Completed local build and AI verification + +Native release compilation completed successfully: **56,693 actions, exit 0**. +The source remains on branch `codex/browser-operator-158` at the pinned stable +revision above. + +- App: `/Users/tyson/chromium/src/out/Release/Browser Operator.app`. +- App version: **158.0.8127.18**, ARM64, bundle ID + `com.browseroperator.BrowserOperator`. +- Optimized, non-component build with bundled DevTools. The final + `verify_libraries_chrome_app` action passed; executable dependencies point + inside the app bundle or to macOS system libraries. +- App size: approximately **703 MB**; complete Release output: **8.5 GB**. + Approximately **14 GiB** remained free after compilation. +- A temporary `caffeinate -i -w ` assertion prevented idle + sleep during compilation and ended automatically with the runner. + +Headless native validation passed using a disposable profile, loopback CDP, +and the mock test keychain. No development HTTP server or custom frontend flag +was used. The browser reported `Chrome/158.0.8127.18` and loaded +`devtools://devtools/bundled/devtools_app.html`. + +The live bundled tool registry passed: + +1. `execute_code`: returned the isolated test page's title. +2. `get_page_content`: returned its heading and accessible controls. +3. `take_screenshot`: returned a valid PNG. + +The frontend accessibility tree contains the Browser Operator welcome screen, +AI Assistant panel, settings, model selector, and chat controls. Provider +credentials are absent, so model conversations were not tested. + +Reusable verification command, after launching the compiled browser with a +disposable profile and `--remote-debugging-port=9445`: + +```sh +node scripts/verify_chromium_release.mjs \ + http://127.0.0.1:9445 158.0.8127.18 \ + /private/tmp/browser-operator-158-verification +``` + +The script saves `report.json` and `page.png`. It inspects the live bundle's +tool registry through CDP; direct imports of development-only tool modules can +fail because their unbundled dependency graphs are not shipped in release +bundles. That initial smoke-test failure did not require a product change. + +Startup log: `/private/tmp/browser-operator-158-headless.log`. +One nonblocking compatibility warning remains: the older frontend sends +`Network.clearAcceptedEncodingsOverride`, which the 158 backend no longer +implements. The tested AI tools work; custom accepted-encoding override +controls have not been validated. Quarantine-attribute and locked-display +fallback messages also appeared during headless startup. + +## Desktop verification completed + +On **2026-11-07 (America/Los_Angeles)**, after the user unlocked the Mac, +native desktop verification passed against the compiled **158.0.8127.18** +release app above: + +- The native **AI Assistant** toolbar button opened the bundled AI panel. +- The branded welcome screen rendered correctly; **Skip** revealed the chat + interface. +- The settings menu opened the provider settings dialog, including the API-key + field and model controls. The dialog closed normally without saving changes. +- The main model picker opened and listed its configured choices; it was + dismissed without changing the selection. +- **Close Chat Window** closed the panel. Clicking the native toolbar button + again reopened it cleanly, with the chat controls rendered correctly. +- The same registered-tool smoke test passed in this visible browser: + `execute_code`, `get_page_content`, and `take_screenshot`, exit 0. + +The desktop test used an isolated profile at +`/private/tmp/browser-operator-158-desktop-20261107`, loopback CDP port **9458**, +and a mock test keychain to avoid accessing the user's keychain. It used the +bundled frontend, without a development HTTP server or custom frontend flag. + +Evidence: `/private/tmp/browser-operator-158-desktop-verification-20261107/` +contains `report.json` and `page.png`. Startup log: +`/private/tmp/browser-operator-158-desktop-20261107.log`. +The release app was left open for the user in this isolated profile. + +Provider credentials remain absent. **Send message** is disabled with the +expected credentials-required message; actual model conversations have not +been tested. The nonblocking protocol warning noted above remains recorded. + +## Distribution readiness audit: 2026-11-07 + +The optimized local build and AI toolbar tests above do **not** constitute a +finished, signed distribution release. The user's About-page screenshot +exposed additional gaps that the toolbar smoke test did not cover: + +- Effective GN values are `is_debug=false`, `is_component_build=false`, + **`is_official_build=false`**, and **`dcheck_always_on=true`**. Therefore + **Developer Build** is an accurate label. A shipping build needs the official + optimization configuration while retaining Browser Operator branding; merely + replacing this label would misrepresent the build. +- **`enable_updater=false`** selects + `chrome/browser/updater/updater_no_updater.cc`. Its `CheckForUpdate` returns + `kUpdateError` with default zero-valued codes. The macOS About-page handler + formats that as the misleading **0 (error code 0)** message. This is a + disabled-updater stub, not evidence of a failed browser-version download or + an AI toolbar failure. The About page needs an honest manual-update message + or a configured Browser Operator updater. +- Settings labels **AI in Chrome** and **You and Google** remain in upstream + settings strings. The existing branding pass did not cover them. Chromium + project attribution is separate from those remaining product labels. +- `codesign -dv --verbose=4` reports only **ad-hoc, linker-signed** binary + signatures, with no team identifier or sealed bundle resources. + `codesign --verify --deep --strict` fails with + `code has no resources but signature indicates they must be present`. + Full application signing has **not** been performed. +- No final DMG or PKG was produced, and the application was **not notarized**. + The current artifact is the locally built `.app` bundle. +- A read-only identity lookup found **one valid Developer ID Application + identity** on this Mac. No private key was used, and notarization credentials + have not yet been verified. + +Remaining distribution work: complete settings/About branding and update +behavior, rebuild with shipping optimization settings, run Chromium's nested +bundle signing pipeline with the intended Developer ID identity, create the +distribution package, and notarize/staple and validate the final artifact. diff --git a/docs/chromium-build-notes.md b/docs/chromium-build-notes.md new file mode 100644 index 0000000000..b73fb368f6 --- /dev/null +++ b/docs/chromium-build-notes.md @@ -0,0 +1,191 @@ +# Local Chromium build notes + +Updated: 2026-11-05 (America/Los_Angeles). + +The active stable 158 release upgrade is documented in +[chromium-158-release-upgrade.md](chromium-158-release-upgrade.md). The 148 +component build below is historical; its output was removed after backing up +the source changes and build configuration. + +## Checkouts and integration + +- Browser Operator frontend: `/Users/tyson/codebase/browser-operator-core`. +- Chromium fork: `/Users/tyson/chromium/src`, version 148.0.7778.56. +- Installed Browser Operator app is version 144.0.7548.0; it is not a build of + this Chromium checkout. +- The fork already has branding, an AI toolbar button, and DevTools CORS changes. + Preserve these existing changes. +- Stock frontend was clean before integration. It was moved to + `third_party/devtools-frontend/src.chromium-original`. The standard `src` + location now symlinks to the Browser Operator frontend checkout, so the + browser build embeds Browser Operator. +- Do not run `gclient sync` blindly across the frontend symlink. Revisit the + local dependency arrangement before syncing or rolling either checkout. + +## Frontend issues resolved + +1. Root dependencies were absent. `npm ci` fails because the lockfile omits + optional platform packages. The configured npm mirror is `npm.skia.org`. + Working install command: + `npm install --legacy-peer-deps --package-lock=false --registry=https://registry.npmjs.org`. + Omitting `--legacy-peer-deps` pulled in a large unrelated peer dependency tree. +2. Standalone build support was missing. The development launcher copies + Chromium's build support and reuses local build tools. A direct symlink to + Chromium's `build/` caused `build_with_chromium` value collisions; the copied + standalone `build/config/gclient_args.gni` must say `false`. +3. Resource validation failed for 47 missing entries. Added the generated + Browser Operator resources to `config/gni/devtools_grd_files.gni`. +4. Unbundled frontend startup made many concurrent module requests. Chromium + returned synthetic `HTTP/1.1 404 Not Found` bodies as JavaScript, producing + misleading `SyntaxError: Unexpected number`. The development HTTP server + now uses a request queue of 512; 256 concurrent requests passed. After a + browser network-service restart, reloading DevTools was also necessary. +5. Python HTTPServer reverse DNS resolution delayed startup. The launcher + skips that lookup when binding to loopback. +6. macOS Keychain prompts blocked first browser startup. The user dismissed + the prompt. Do not enter or request passwords for this test profile. +7. The esbuild dependency must not symlink through the stock frontend `src` + path once it points back to Browser Operator. Copied the local esbuild + directory before replacing the Chromium frontend path. + +## Verified development setup + +- `npm run chromium:dev` builds and launches the local frontend. +- Frontend resource checks pass; the default development build transpiles with + esbuild and skips full TypeScript checking. +- The AI panel renders. Actual ExecuteJavaScriptTool, GetAccessibilityTreeTool, + and TakeScreenshotTool calls passed against an isolated test tab. +- Model conversations have not been tested; provider credentials are absent. +- Current development profile is `out/browser-operator-profile` in the frontend + checkout. The running test used HTTP port 8000 and debugging port 9333. + +## Native Chromium build + +Output directory: `/Users/tyson/chromium/src/out/BrowserOperator`. + +```gn +is_debug = false +is_component_build = true +symbol_level = 0 +blink_symbol_level = 0 +v8_symbol_level = 0 +use_remoteexec = false +use_siso = false +use_system_xcode = true +target_cpu = "arm64" +devtools_skip_typecheck = true +devtools_bundle = false +``` + +GN generation passed: 29,361 targets from 4,571 files. +Host: 16 GB RAM, 10 logical CPUs, Xcode 26.3. Approximately 43 GB free before +the build. Started with five jobs, then increased to eight after checking +56% system-wide memory availability and zero swap use. During heavier Blink +compilation, swap grew to about 2.9 GB; reduced to six jobs to limit pressure. +Monitor memory and disk. + +```sh +cd /Users/tyson/chromium/src +./buildtools/mac/gn gen out/BrowserOperator +DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer \ + ./third_party/ninja/ninja -C out/BrowserOperator chrome -j 6 +``` + +GN log: `/private/tmp/browser-operator-chromium-gn.log`. +Compiler log: `/private/tmp/browser-operator-chromium-build.log`. + +## Native build issues + +1. At action 6,435, ANGLE's `angle_metal_internal_shaders_to_air` failed: + `cannot execute tool 'metal' due to missing Metal Toolchain`. + Xcode 26.3 is installed, but its optional Metal component was absent. + Installed it with Apple's `xcodebuild -downloadComponent MetalToolchain`; + download log: `/private/tmp/browser-operator-metal-toolchain.log`. + Download succeeded but `xcrun metal` initially still reported the component + missing. Clearing the stale tool cache with + `DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer xcrun --kill-cache` + resolved this outside the sandbox. `xcrun metal --version` then returned + Apple metal 32023.864. Resume commands explicitly set the same DEVELOPER_DIR. +2. Metal compilation then failed because the workspace sandbox denied writes + to `/Users/tyson/.cache/clang/ModuleCache`. Resumed the Ninja build outside + the sandbox, with the same arguments; no shader source changes required. + +## Completed native build and verification + +Status: **native build completed successfully**, Ninja exit status 0. All +55,615 original build actions completed across incremental resumes. + +App: `/Users/tyson/chromium/src/out/BrowserOperator/Browser Operator.app`. +Version: **148.0.7778.56**. This is a development component build: keep the app +inside its output directory, alongside the component libraries. It is not a +standalone redistributable app package. + +The fork's modified toolbar view, DevTools UI/CORS implementation, and main +delegate compiled. No Chromium C++ source fixes were necessary. + +Native verification used **bundled DevTools**, without +`--custom-devtools-frontend` or the development HTTP server: + +- The native browser started and reported Chrome/148.0.7778.56 over CDP. +- `Target.openDevTools` opened its bundled frontend. +- The accessibility tree contained the Browser Operator welcome screen and + AI Assistant panel, settings menu, model selector, and chat controls. +- Actual ExecuteJavaScriptTool, GetAccessibilityTreeTool, and TakeScreenshotTool + calls succeeded against an isolated local test page. +- Provider credentials remain absent; model conversations were not tested. + +The Mac was initially locked when the build finished. After the user unlocked +it and dismissed the Keychain prompt, native desktop verification passed: +the bundled welcome screen and AI Assistant chat controls rendered correctly, +and the toolbar AI Assistant button opened the panel. The normal headed launch +uses `out/BrowserOperator/verification-profile` and debug port 9444. +Headless verification used a separate disposable profile, +`--use-mock-keychain`, and debug port 9445 to avoid accessing the user's keychain. +The mock keychain flag was only used for that headless test. + +Startup logged quarantine-attribute removal warnings and display-link fallback +warnings while locked; these did not prevent headless startup or tool execution. +Native startup logs: `/private/tmp/browser-operator-native.log` and +`/private/tmp/browser-operator-native-headless.log`. + +Launch the compiled app directly, or use `npm run chromium:dev` to run it with +the current frontend checkout. The development launcher now prefers the +`out/BrowserOperator` build over the older installed app. + +## Existing upstream patch scripts + +User identified the authoritative repository: +https://github.com/BrowserOperator/build-script + +Cloned to `/Users/tyson/chromium/build-script`, commit `c236edd` (2025-08-28). +It provides text branding, theme assets, executable renaming, the AI toolbar +patch, and Linux AppImage packaging. Do not duplicate that workflow unnecessarily. + +Actual commands differ from its README: + +```sh +python3 /Users/tyson/chromium/build-script/smart_rebrand.py \ + --base-path /path/to/fresh/chromium/src --dry-run +python3 /Users/tyson/chromium/build-script/copy_assets.py \ + /path/to/fresh/chromium/src --dry-run +cd /path/to/fresh/chromium/src +git apply --check /Users/tyson/chromium/build-script/0001-executable-renaming-browseroperator.patch +git apply --check /Users/tyson/chromium/build-script/0002-AI-Assistant-button-clean.patch +``` + +Compatibility checks used isolated pristine files from the local Chromium 148 +HEAD (`2168922908ef32ab99e4310be3c5bfb640702dce`), without modifying the built fork: + +- Executable-renaming patch: `git apply --check` passed. +- AI toolbar patch: requires rebase at `theme_resources.grd`, `toolbar_view.cc`, + and `toolbar_view.h`. These are 2025 patches, not a guaranteed newer-version port. +- Both Python dry-run commands completed against the existing checkout. +- README incorrectly uses a positional path for smart_rebrand.py and names + a nonexistent `0002-Added-custom-button.patch`. +- `copy_assets.py` deletes each destination theme directory before copying. + Review newer Chromium assets before applying it to avoid losing required files. +- This repository does not include DevTools frontend linkage or the fork's + DevTools CORS changes. Those remain separate integration steps. + +Dry-run logs: `/private/tmp/browser-operator-branding-dry-run.log` and +`/private/tmp/browser-operator-assets-dry-run.log`. diff --git a/docs/chromium-change-review.md b/docs/chromium-change-review.md new file mode 100644 index 0000000000..1f9880585e --- /dev/null +++ b/docs/chromium-change-review.md @@ -0,0 +1,139 @@ +# Browser Operator Chromium changes for review + +Updated 2026-11-09. This review covers local development setup, Chromium 158/159 +integration, signed release packaging, native macOS automatic updates, the +private Omaha test server and the opt-in CircleCI release path. + +## Review stack + +The browser changes are split into three dependent draft PRs (merge bottom +first). Their exact PR URLs are recorded in the descriptions: + +1. [PR #102](https://github.com/BrowserOperator/browser-operator-core/pull/102) + `codex/chromium-integration` targets `codex/browser-operator-review-base`: + frontend/development support, Chromium 158/159 patches 01–07 and AI assets. +2. [PR #103](https://github.com/BrowserOperator/browser-operator-core/pull/103) + `codex/signed-macos-releases` targets `codex/chromium-integration`: + official builds, immutable input/build validation, nested signing, + notarization, APFS packaging and release verification. +3. [PR #104](https://github.com/BrowserOperator/browser-operator-core/pull/104) + `codex/native-macos-updates` targets `codex/signed-macos-releases`: + patch 08, native update configuration, client packaging and qualification. + +The review root preserves the original `fix/simplification` snapshot; that +remote branch was removed. Current main has diverged and has not been integrated +into this stack. The old combined PR #101 is superseded, not merged. + +The private server, all server tests and cloud deployment have one owner: +https://github.com/BrowserOperator/omaha. Browser qualification takes an explicit +`--omaha-src` at the pinned revision in `scripts/updater/omaha_checkout.py`; +normal frontend/manual-release builds do not require the private repo. + +CircleCI remains [draft PR #7](https://github.com/tysonthomas9/test-github-pipeline/pull/7) +in its separate repository. It depends on the browser stack's top PR for native +update publication. GitHub cannot stack a PR across repositories, so this +cross-repository dependency is explicit in both descriptions. + +Nothing is merged by this work. Existing unrelated tracked node_modules +changes are excluded. Private keys, keychain credentials, VM state and binary +release outputs remain outside Git. The ephemeral public HTTPS endpoint and +public key configuration are generated locally and ignored by Git. + +## Browser integration and resource fixes + +- `scripts/chromium_dev.py`, `package.json`, panel Readme: development launcher + for a separate profile and locally served frontend. +- `scripts/build/typescript/typescript.gni`: support newer Chromium TypeScript + dependency contracts while retaining this frontend's legacy internal targets. +- `front_end/panels/ai_chat/BUILD.gn`, `config/gni/devtools_grd_files.gni`: + derive resource outputs from the real action and include missing provider, + settings, persistence, memory and image resources in the packaged app. +- `OnboardingDialog.ts`: remove unreachable statements caught by release + typechecking. The native toolbar is implemented in the Chromium patches. + +## Chromium patches and release pipeline + +`patches/chromium/{158.0.8127.18,159.0.8144.0}` holds reviewed, version-specific +patches for naming, DevTools CORS, native toolbar, icons, About/manual-update +branding, remaining product display strings, and the native updater integration. +The live Chromium checkout's origin is upstream Google; custom changes are +reviewed and distributed here as patch files, not pushed to Google's upstream. +The existing build-script branding workflow remains part of checkout preparation. + +- `scripts/apply_chromium_patches.py`: check a full patch series before applying. +- `scripts/sync_chromium_release.py`, `scripts/chromium_sync_git/git`: pinned + dependency sync safeguards, including the external DevTools symlink guard. +- `config/chromium-release-mac-arm64.gn`, `scripts/build_chromium_release.py`: + official optimized ARM64 build with PGO, full frontend typechecking, six jobs + and a disk-space guard. ThinLTO stays off for this host's memory limit. +- `scripts/package_chromium_release.py`, `scripts/chromium_apfs_dmg.py`, + `scripts/chromium_build_input.py`: + upstream nested Developer ID signing, hardened runtime, notarization/stapling, + APFS DMG, strict mounted signatures, Gatekeeper and functional smoke tests. + APFS avoids the observed HFS packaging signature damage. +- `scripts/verify_chromium_{about,release}.mjs`, `scripts/chromium_cdp.mjs`: + actual running version, About branding and bundled tool checks. + +## Native update qualification + +`config/chromium-autoupdate*.gn`, `config/updater/macos-local-test.gni` and +patch 08 configure an isolated native updater identity, CUP response trust and +pinned CRX package trust. Google extension/component trust roots are unchanged. +Generated launch-agent plists have quarantine removed before bootstrap. + +`scripts/updater/` includes immutable build snapshots, nested updater signing, +verified ZIP/CRX packaging, actual Chromium CUP/CRX/unzip verification, baseline +installation, bookmark preservation, About checks and +scheduled launchd background qualification. The normal first run uses macOS +Launch Services. Cloud test configuration uses a fresh key generated on the +VM; only its public key is exported and compiled. Composition records a real +158 engine plus separately built 159 HTTPS helper without relabeling the engine. + +`publish_test_update.py` publishes immutable `autoupdate-test-*` prereleases +only, checks the uploaded asset's SHA256/size, and does not activate Omaha. +The CircleCI wrapper calls these shared scripts. Publishing is opt-in and +requires signing-key paths on the runner plus GitHub authorization. It does +not automatically promote a production feed. + +## Omaha service + +The private `BrowserOperator/omaha` repository contains the standalone Omaha 4 +service. It uses request/nonce/response-bound ML-DSA-44 CUP signatures, pinned +CRX3 payload metadata, version/platform/architecture filtering and GitHub release +URL restrictions. Its public deployment binds the Python server to loopback, +uses trusted HTTPS through nginx, limits workers/time/body/rate, and runs under +a restricted system account. The VM uses IAP SSH, no service account, an isolated +network, and automatic deletion after four hours. No local signing key was +transferred. The browser harness launches the pinned canonical server for local tests; +there is no second server or deployment implementation in the browser repo. + +## Evidence and remaining work + +Passed on this Mac (ARM64): full native release builds; Developer ID signing; +Apple notarization and stapled tickets; Gatekeeper; mounted-DMG smoke tests; +CUP tamper/replay and CRX wrong-key/tamper rejection; real 158-to-159 in-app +upgrade; installed launchd periodic background upgrade; actual engine 159 +relaunch; original bookmark UUID; native About and AI toolbar open/close/reopen. +The standalone service's ten native/protocol tests pass. YAML parsing and shell +syntax checks pass for the CircleCI changes. + +The command-line utility RPC gets a macOS System Policy write denial, while +native browser and scheduled launchd paths succeed. Qualification uses actual +installed bytes/version/signatures, not the utility's misleading exit zero. +Only disposable-controller timestamps were adjusted to simulate a due check; +no macOS privacy permissions changed. + +Also PASSED: the real GCP HTTPS Omaha scheduled 158-to-159 update, with a +173996709-byte GitHub Releases download, native CUP/CRX verification, actual +159 relaunch, preserved bookmark, updated About status and platform trust. +Both cloud DMGs are signed/notarized; the test prerelease and uploaded asset +hashes were verified. Draft publication recovery was exercised against GitHub. + +Still pending at this review checkpoint: a remote CircleCI execution/schema check, +production rollout and updater self-update. x86/universal, Windows and Linux +are not qualified. LLM provider conversations were not tested without keys. + +See `chromium-macos-autoupdate-158-to-159.md` for exact artifacts, hashes and +historical failure/recovery evidence, and `chromium-macos-release-pipeline.md` +for the original pipeline audit. Upstream 158.0.8127.18 is Beta and +159.0.8144.0 is Dev; Official Build describes build settings, not Stable channel. diff --git a/docs/chromium-macos-autoupdate-158-to-159.md b/docs/chromium-macos-autoupdate-158-to-159.md new file mode 100644 index 0000000000..48d67db2ce --- /dev/null +++ b/docs/chromium-macos-autoupdate-158-to-159.md @@ -0,0 +1,504 @@ +# macOS 158 to 159 automatic-update qualification + +Review organization: the client changes now form a three-PR stack described +in `chromium-change-review.md`. Server implementation, server/native crypto +tests and GCP provisioning live only in private BrowserOperator/omaha. Commands +below that reference scripts/updater/omaha_service.py, test_omaha_service.py or +provision_gcp_test_vm.py are historical. Use the canonical repo's module/tests/ +deploy paths and `scripts/updater/README.md`; local browser qualification now +requires explicit --omaha-src at its reviewed pinned revision. + +Current checkpoint (2026-11-09): signed/notarized ARM64 158 and genuine 159 +both passed local native update qualification. The normal Launch Services +in-app update PASSED, and the installed launchd periodic background update +PASSED. Actual relaunched engine 159.0.8144.0, original bookmark UUID, strict +signatures, notarization tickets, Gatekeeper and native About/AI toolbar tests +all passed. No privacy/App Management permissions changed. Report: +/Users/tyson/chromium/updater-test/normal-upgrade-qualification-report.json. + +The command-line UpdaterUtil RPC still gets macOS System Policy rsync denial +74103/12. This does not reproduce from the browser or the updater's scheduled +launchd job. The scheduled test reset only last_checked/last_started in the +idle disposable controller to simulate a due check, then kickstarted its own +wake job. Do not use utility exit 0 as proof of update success. The test script +now exercises the actual scheduled path. Details and failed evidence below. + +Cloud 158-to-159 scheduled native update qualification PASSED on an authorized e2-micro in +browseroperator-1746729957294, billed to the explicitly selected account ending +B70C99. The VM has IAP-only SSH, no service account, trusted HTTPS, and automatic +deletion after four hours. A separate CUP private key was generated ON the VM; +only its public key is exported for native compilation. The local CUP key was +not transferred (automatic approval review rejected that export). Cloud key +public SHA256: ef863a8811e5d67c187a08c02d1a65c780df6e5ba6b0457fabc7bc0543639909. +Official clients require a compiled HTTPS endpoint; developer remote URL +overrides are intentionally not available and were not enabled. + +Private service repository: https://github.com/BrowserOperator/omaha. The user +also authorized pushing browser and CircleCI work to their existing remotes. +The signed cloud payload was published as a GitHub prerelease and all four +uploaded asset hashes/sizes were verified. The native scheduled updater fetched +173,996,709 bytes directly from GitHub, verified CUP/CRX, installed genuine 159, +retained the bookmark, and passed strict signatures/ticket/Gatekeeper. About +returned up to date. Cloud report: +/Users/tyson/chromium/updater-test/cloud-158-to-159-qualification/qualification-report.json. +Test release: +https://github.com/BrowserOperator/browser-operator-releases/releases/tag/autoupdate-test-159.0.8144.0-macos-arm64-20261109. +The VM is temporary and automatically deletes after four hours; this endpoint +and key are not a production feed. Current draft reviews: +browser stack #102 → #103 → #104 at +https://github.com/BrowserOperator/browser-operator-core/pull/104 and +https://github.com/tysonthomas9/test-github-pipeline/pull/7. Never publish loopback builds as production releases. Only ARM64 is +qualified; x86, universal, Windows, Linux, updater self-update and production +rollout remain separate work. The original /Applications app is unchanged. + +Historical checkpoints below preserve earlier failures and recovery evidence; +they are superseded by this checkpoint when they describe current status. + +## Version correction and genuine source + +The upstream version list currently identifies 158.0.8127.18 as Beta, not Stable; +the earlier stable label in historical upgrade notes was incorrect. Official +optimization/signing status is separate from upstream release channel. + +Baseline source: 158.0.8127.18 at +6449d9f9a6a906edff724b7b220199b3fde4615c. Target is genuine Dev source +159.0.8144.0 at f19f8ee8a6b566fbd0cea6bdf05e284712cba9b9, fetched as a shallow +local tag and verified against Google's release metadata. Do not relabel a +158 binary as 159. The installed /Applications app and personal profile are +outside the test installation. + +## Implemented foundation + +- config/chromium-autoupdate-mac-arm64.gn enables updater and notifications. +- config/updater/macos-local-test.gni contains PUBLIC trust keys and a loopback + endpoint. The updater uses its own BrowserOperatorUpdateTest identity and + data/launchd namespace. Production/manual release defaults stay unchanged. +- Version-specific patch 08 adds per-configurator CUP trust keys; Google's + component/extension updater trust roots are unchanged. Browser Operator CRX + archives require its pinned key rather than Google's publisher proof. +- Current Chromium CUP uses ML-DSA-44, not the older ECDSA scheme. Private local + test keys are outside the source repos at + /Users/tyson/chromium/browser-operator-updater-private/test-keys (0700, key + files 0600). Never upload or commit them. Production key custody/rotation and + public HTTPS service deployment remain separate work. +- scripts/updater/omaha_service.py implements loopback Omaha 4 responses, + nonce/request/response-bound CUP signatures, local verified CRX downloads, + and explicit invalid-CUP/corrupt-download test modes. It offers no update + to mismatched OS/architecture, unknown apps, same or newer versions. +- scripts/updater/native builds a verifier using Chromium's actual CUP and CRX + implementations. All nine HTTP/protocol/native crypto tests PASSED, including + tampering, wrong pinned CRX key, and CUP replay rejection. Log: + /private/tmp/browser-operator-updater-crypto-tests.log. +- The updater-enabled 158 browser and updater/signing/CRX/native verification + tools compiled successfully. Build log: + /private/tmp/browser-operator-158-updater-build.log; runner: + /private/tmp/browser-operator-158-updater-runner.log. +- scripts/updater/sign_embedded_updater.py preserves upstream nested updater + signing/notarization, exports the stapled updater without its legacy HFS/PKG + packaging, and embeds it before the browser is signed. Browser DMGs use the + existing verified APFS adapter. Test artifacts have an updater-test suffix. +- The embedded updater AND containing 158 app were accepted by Apple and + stapled. Main app request: e58e8ceb-fa08-4fab-8d33-fc8709ad946d. The DMG's + subsequent submission failed because notarytool suddenly reported the + existing tthoma9 credential profile missing. User has been asked to unlock + their login keychain/restore the profile; do not ask for secrets in chat. + Preserve the signed DMG in the signing-attempt directory for resubmission. + +## Current processes and paths + +The loopback service runs on 127.0.0.1:18158, unified-exec session 41119 (verify its PID before stopping it). +It reads /Users/tyson/chromium/updater-test/catalog.json, currently EMPTY +(no updates), with artifacts under that directory's artifacts subdirectory. +Log: /private/tmp/browser-operator-omaha-test-service.log. + +Baseline test package root: +/Users/tyson/chromium/releases/158.0.8127.18-arm64-updater-test +Packaging log: /private/tmp/browser-operator-158-updater-package.log. + +Test app destination: +/Users/tyson/chromium/updater-test/install/Browser Operator.app +Its profile must be disposable and remain separate from the user's profile. + +## Verified baseline and scheduling fix + +The separate 158 test app passed a real CUP-signed native About check: +`baseline-verification/native-updater-report.json` reports `updated`, +“Browser Operator is up to date”, and Official Build. Bundled tools also passed. +This proves the native no-update path, not a completed upgrade. + +The first installation's background launch agent failed. Unified macOS logs +identified quarantine on its generated plist. Removing quarantine from ONLY +the owned test plist allowed bootstrap to succeed, confirming the cause. +Patch 08 now calls the existing RemoveQuarantineAttributes helper on the +updater's generated launch item before bootstrap. That correction compiled. +A fresh signed installation must still prove scheduling without manual repair. +The first notarized test app predates this fix and is diagnostic only. + +Both version-specific patch 08 files include the correction. All eight 159 +patches passed application and reverse checking on a fresh partial 159 tree; +report: /private/tmp/browser-operator-159-patch-preflight.json. + +Full 158 source recovery inventory (tracked diff, untracked source, theme +assets, dependency revisions, gclient configuration) is preserved at: +/Users/tyson/chromium/browser-operator-backups/158-updater-before-159. +Do not port old generated sample_credits.html onto 159. + +## Next required work + +1. COMPLETED: preserved the corrected 158 signing input at + /Users/tyson/chromium/updater-test/158-frozen-input (428 hashed inputs, 382 MiB), + using scripts/updater/frozen_input.py. + It hashes files and records source/config provenance, allowing native output + to be reused without confusing the 158 package with the later source version. + Frozen-input tamper rejection passed. GN args inspection rewrites gn_logs.txt; + refresh the native targets after capturing settings before freezing. +2. After credentials are restored, sign/notarize the corrected 158 snapshot into + a NEW output directory. Do not ship the first diagnostic test DMG as the + corrected build or claim its missing DMG ticket has passed. +3. COMPLETED: restored stock DevTools before pinned 159 sync; all dependency + sync/hooks passed. Recovery stash: 61c5b67897c26181511762a5b791658d4ab275ba. + Current branch codex/browser-operator-159-autoupdate, source f19f8ee8...; + stock 159 DevTools e1df1f10d345d52b88827564aa71ec3ea8462151 is preserved as + src.chromium-159-original and the external frontend link is restored. + scripts/sync_chromium_release.py adds shallow pinned sync and a disk guard. + Sync log /private/tmp/browser-operator-159-sync.log, exit 0. +4. COMPLETED: all 8 reviewed 159 patches applied; smart branding passed; + restored 67 inventoried theme assets and com.browseroperator.BrowserOperator + bundle identity. Genuine 159 optimized ARM64 compilation is RUNNING: + /private/tmp/browser-operator-159-updater-build.log, runner + /private/tmp/browser-operator-159-updater-runner.log, exec session 79029. + It reuses out/Release, 6 jobs, 5 GiB free-space guard. Check live process/log + before resuming, never run a second Ninja in this output directory. +5. Build/sign/notarize genuine 159. Produce its update ZIP with the upstream + generated browser .install script, sign CRX3 with the test RSA key and verify + with the native verifier. Publish only to the local test catalog initially. +6. Real upgrade tests must prove signed check/download/install, relaunch into + actual 159, preserved isolated profile/bookmarks, valid final signatures, + and no change to /Applications. Reject tampered response and payload and + prove the baseline remains usable. Capture native About/AI toolbar tests. +7. Record results and wire qualified artifact publication into CircleCI. A + genuine upgrade, public server, GitHub publication and cross-platform + qualification have not been completed; never imply otherwise. + +## Additional qualification tools + +scripts/updater/profile_sentinel.mjs creates/checks a bookmark through the +optimized Bookmarks WebUI bundle. Seed passed on the disposable 158 profile; +report updater-test/profile-seed-verification/profile-sentinel.json. Bookmark +UUID ad12f6ed-eb20-52e8-ab9a-52c2549b9721 must survive the real update. +probe_macos_baseline.py supports --version, --status, --stage and +--profile-sentinel seed/check for baseline and post-upgrade verification. + +scripts/updater/package_macos_update.py requires a verified notarized local-test +release, creates a symlink/mode-preserving ZIP, uses Chromium's actual unzip +implementation, rechecks app signatures/ticket/Gatekeeper, signs CRX3 and checks +the pinned key. It writes a candidate catalog; never activates or publishes it. +Two archive tests passed; actual 159 packaging/round-trip is still pending. +The Omaha crx3 operation path is Browser Operator.app (NOT .install): Chromium +InstallFromApp invokes the sibling .install script with the required arguments. + +Build runner now captures shipping settings before Ninja. Inspecting GN after +Ninja rewrites gn_logs.txt and makes license resources stale. Packaging reads +that captured metadata with source-revision/args checks, then requires current +native targets. The in-flight 159 runner started before this runner improvement; +for this build, capture settings and refresh native targets before freezing. + +The existing local CircleCI mac-release-shipping.sh remains the manual-update +shipping path; it has NOT run the new upgrade qualification or published update +packages. No production updater endpoint/trust keys or public feed is deployed. + +## Real native invalid-CUP test: passed + +The test service returned deliberately invalid CUP proofs to the notarized 158 +baseline. The actual About/native updater returned failed (-10000), as expected. +Report: updater-test/invalid-cup-verification/native-updater-report.json. +The catalog remained empty, and no application update was installed. + +The first bookmark restart check exposed a TEST HARNESS issue: SIGTERM exited +before the deferred bookmark save. The probe now requests CDP Browser.close for +graceful shutdown. Reseeding and cold-relaunch checking passed, including a +healthy native About update check after the fault was removed. Report: +updater-test/recovery-after-invalid-cup/profile-sentinel.json. Its bookmark UUID +matches invalid-cup-verification/profile-sentinel.json. Both clear and encrypted +bookmark files now exist in the disposable profile. This is baseline recovery +validation, not yet a 158-to-159 preservation result. + +The isolated updater registration was checked explicitly: browser ecp is +/Users/tyson/chromium/updater-test/install/Browser Operator.app, pv 158.0.8127.18. +Recheck that exact ecp before activating the 159 candidate; mounted-DMG smoke +tests can otherwise change the updater registration to a temporary volume. +The healthy service is running again; catalog still empty. + +Current continuation checkpoint: 159 Ninja exceeded 15,000 of approximately +56,500 actions with no compiler errors observed; approximately 15 GiB free. +The notarization profile tthoma9 remains missing on read-only checks. There is +one pending user request to restore/unlock it; do not request any credentials +in chat. Do not mark signing, fresh launch-agent installation, corrupt-download +rejection or the real 159 upgrade complete until their evidence exists. + +## Background-priority native check: passed + +Created a diagnostic-only copy of the 158 UpdaterUtil under updater-test/tools, +Developer ID signed it with the same team and hardened runtime, and verified its +signature. This tool has NOT been notarized as a distribution artifact. +--list-apps confirmed only the owned test updater and Browser Operator 158. +--list-update --background --product=com.browseroperator.browseroperator --json +performed a real signed no-update round trip, exit 0. Report: +updater-test/tools/background-check.json. No new version is offered yet. +This proves the background-priority RPC/check path, not a natural timer-triggered +upgrade. Fresh installation scheduling still needs the corrected signed helper. + +Code signing succeeded, confirming the signing identity is usable. Notarytool +still cannot locate tthoma9; the user was given a more specific request to restore +that credential profile locally with notarytool store-credentials (no secrets in +chat). Compiling proceeds independently. + +## Snapshot and signing commands for continuation + +After the native build completes, the canonical runner writes verified shipping +settings before Ninja; packaging also hashes all imported GN config inputs to +reject stale settings. This first in-flight 159 run predates that improvement: +rerun the canonical build command once after completion to capture settings and +finish any generated-resource refresh, then freeze without invoking GN again. + + python3 scripts/updater/frozen_input.py --chromium-src /Users/tyson/chromium/src --output /Users/tyson/chromium/updater-test/159-frozen-input + +After tthoma9 authentication is restored, corrected 158 can be signed while 159 +compiles, independently of live native output: + + python3 scripts/package_chromium_release.py --chromium-src /Users/tyson/chromium/src --frozen-input /Users/tyson/chromium/updater-test/158-frozen-input --updater-enabled --output /Users/tyson/chromium/releases/158.0.8127.18-arm64-updater-fixed + +The latest read-only notarization retry still reports missing profile. Code +signing remains functional. Never reuse the old diagnostic package as proof of +the corrected first-install scheduling behavior. + +The production /Applications app was rechecked and its pre-test signature, +executable hash and Info.plist hash recorded in updater-test/production-app-before.json. +It is still 158.0.8127.18, Developer ID team BN879H59CY, with strict signatures +valid. Compare this evidence after the actual test. No personal profile was read. +The background --update RPC with an empty catalog also returned success/no-update; +log updater-test/tools/background-update-nooffer.log. + +## Production follow-up: updater self-updates + +Chromium's EnsureUpdater returns once the browser is registered; it does not +replace an existing updater merely because a newer helper is embedded in a new +browser bundle. Production publication must therefore also serve signed updater +self-update payloads for its separate updater app ID. The current empty/local +browser-only candidate catalog does NOT qualify updater self-updates. The macOS +prototype's 158 updater can perform the requested browser 158-to-159 test, but +never treat that alone as complete production update infrastructure. Retain the +upstream self-update path rather than silently leaving the updater stale. + +Source reference: chrome/browser/updater/browser_updater_client_util_mac.mm, +EnsureUpdater/IsBrowserRegistered branch. Recheck the isolated browser ecp after +any mounted-DMG smoke test before enabling a candidate. All test commands use +user scope; never pass --system to the test utility. + +## Credentials restored; corrected baseline packaging resumed + +The user restored tthoma9 and confirmed it. Read-only notarytool authentication +passed. Corrected 158 packaging is running independently of the 159 native build: +exec session 37820; /private/tmp/browser-operator-158-updater-fixed-package.log; +output /Users/tyson/chromium/releases/158.0.8127.18-arm64-updater-fixed. +Its corrected helper was already accepted/stapled. Containing app submission +6e4cf9c8-bc94-4a8d-98fa-23f1742c0afb is pending at this checkpoint. +Do not treat earlier missing-profile notes as the current blocker. + +After the corrected package passes final mounted validation, preserve old test +controller logs/data, uninstall ONLY the custom test updater, and replace ONLY +updater-test/install/Browser Operator.app with the corrected signed baseline. +Keep the same disposable profile/bookmark. Prove fresh first-install launchd +bootstrap succeeds with NO manual xattr repair, and installed helper CDHash +matches the newly notarized embedded helper, before offering any 159 candidate. + +## Corrected 158 baseline: fully packaged and fresh install passed + +All corrected 158 signing/notarization/mounted smoke checks passed. Final DMG: +releases/158.0.8127.18-arm64-updater-fixed/artifacts/BrowserOperator-158.0.8127.18-arm64-updater-test.dmg +SHA256 d661942475f7f074e5f5cad8f8db1dacde44ca4a39b80aa22f132e0ecc2adbd8. +DMG Apple request 3f53cdcd-ba5c-4a18-b6ce-bec87626d86f; accepted/stapled. +release-manifest.json records source 158, official settings, Gatekeeper and mounted +functional tests passed, local-test channel, real-upgrade status still pending. + +The first final verifier assumed all apps have nonempty entitlements; the helper +legitimately has none. Fixed empty output handling while retaining strict parsing +for malformed nonempty output and rejection of get-task-allow. Resumed with +--verify-existing (no rebuild, re-sign, or re-upload), exit 0. + +scripts/updater/install_macos_test_baseline.py preserved the OLD diagnostic app +and test controller under updater-test/before-corrected-baseline, natively +uninstalled ONLY the owned test updater, installed the corrected DMG app into +updater-test/install, and launched it with the SAME disposable profile. +Fresh native About check passed; launchctl confirmed the wake job bootstrapped +without manual xattr repair. First bootstrap evidence was saved BEFORE resume +checks: corrected-baseline-verification/first-bootstrap-launch-agent.txt. +The plist has com.apple.provenance only, no quarantine. + +The new script needed macOS xattr CLI inspection (Python on this Mac has no +os.listxattr) and resumed-variable scoping corrections. --verify-installed then +passed, without resetting or repairing anything. Final report: +updater-test/fresh-baseline-install.json. Installed helper CDHash matches the +corrected embedded helper: 317bcdb468840c033b3a063bd5962b0be3279a56. +Browser registration ecp remains updater-test/install/Browser Operator.app, +pv 158.0.8127.18. The original test bookmark UUID ad12f6ed-eb20-52e8-ab9a-52c2549b9721 +survived the fresh application/controller installation and native restart checks. + +159 compilation remains running in session 79029, exceeding 36,000 actions at +this checkpoint, no reported compiler failures; approximately 13 GiB free. + +## 159 native build complete; desktop unlock pending + +159 full native compilation completed successfully (56,237 actions), followed by +the updated canonical runner's settings capture/resource refresh (exit 0). +Frozen signing input: updater-test/159-frozen-input, 420 hash-verified entries. +Its framework contains ONLY 159.0.8144.0 and Current -> 159.0.8144.0; no stale +158 framework tree remains. All nine tests passed against the actual new 159 +CUP/CRX verifier; log /private/tmp/browser-operator-159-updater-crypto-tests.log. +Both archive fixture tests passed too. + +Attempted 159 packaging from the frozen input into +releases/159.0.8144.0-arm64-updater-test. Authentication preflight failed with +missing-profile message BEFORE output/signing started. The output directory +does not exist, so this exact command can be retried without overwriting anything. +Read-only ioreg confirmed CGSSessionScreenIsLocked=Yes. Login keychain remains +no-timeout; explicit login-keychain lookup has the same notarytool error. The +user was asked to unlock Mac/login Keychain; RETRY existing profile first. Do +not assume it was deleted or ask for credentials in chat. Mac UI testing also +needs the unlocked desktop. Temporarily keeping the display awake during the +short final signing/UI test window avoids repeated idle-lock interruptions. + +Native ZIP qualification completed while unlock was pending: +updater-test/native-zip-roundtrip/report.json. The real Chromium 159 extractor +restored the corrected signed 158 app with strict signatures valid, stapled +ticket valid and Gatekeeper accepted. No installer was executed and the test +registration was unchanged. This validates archive mechanics, not a 159 upgrade. + +Final pre-handoff state: native 159 full/finalize builds and 9 crypto/protocol +checks passed, 2 archive fixture checks passed, 159 snapshot preserved. Corrected +158 DMG fully verified and freshly installed, wake agent and profile proven. +Mac still locked on repeated ioreg checks; 159 packaging did NOT start because +notarytool could not access tthoma9. User unlock request is pending. Retry the +same 159 package command after unlock; output directory is absent. Start a +short-lived display-awake assertion during final packaging/UI work so the Mac +does not idle-lock again. Keep all tests in the owned namespace and compare +production-app-before.json at completion. Local service session 41119 remains +healthy with an empty catalog. No CI run or GitHub publication was performed. + +## Normal macOS first-run resolved local installation denial + +The first automated qualification attempt used a platform filter that missed +Chromium's native os.platform value "Mac OS X". Added this alias and regression +coverage; all TEN native/protocol/HTTP tests passed. Second attempt logs are in +updater-test/local-upgrade-qualification-2. Invalid CUP and corrupted payload +were both rejected with application bytes/bookmark unchanged. The valid native +background RPC found/downloaded/verified/unpacked 159, then failed at rsync mkdir +with System Policy deny(1) file-write-create. Utility exit 0 only means RPC +completion; its app-specific error was 74103/12. Never rely on exit 0 alone. + +The System Settings CUA inspection stalled and was interrupted; no settings +were changed. User confirmed App Management entries were not enabled. Preserve +that state. Corrected the test flow: backed up/uninstalled ONLY the test updater, +launched the signed 158 app via normal Launch Services with its existing test +profile, and opened native About. Normal first-run registration/check passed. +Then offered the authenticated 159 candidate: native UI progressed updating -> +nearly_updated; app on disk became 159. Code signatures/stapled ticket/Gatekeeper +passed. Normal relaunch produced actual Chrome/159.0.8144.0; original bookmark +identity, bundled tools, and native About updated status all passed. + +CUA runtime reset fixed the stalled UI connector. Actual 159 desktop checks: +About Official Build/ARM64 and up-to-date status, AI toolbar open, onboarding +Skip, panel Close Chat Window, toolbar reopen and toggle-close all PASSED. +Evidence: updater-test/159-desktop-verification/{desktop-report.json,about-159.png, +ai-toolbar-open.png,ai-toolbar-closed.png}. Provider conversations untested without +credentials. CUA completion summary was recorded. The 159 test GUI remains open; +endpoint in updater-test/normal-launch-159.json. Only that disposable GUI may be +closed for further tests. The production app is unchanged. + +probe_macos_baseline.py now supports --launch-via-services; first-run baseline +installer uses it. The normal first-run launch context matters on this Mac; +do not use a broad privacy permission change to mask a harness issue. + +Cloud authorization: account ending B70C99 selected; project billing enabled. +provision_gcp_test_vm.py targets one e2-micro, Debian 13, 10 GiB standard disk, +separate test VPC/subnet, web ports 80/443, IAP-only SSH, OS Login, no VM service +account, and automatic DELETE after 4 hours. Current provisioning exec 45813; +log /private/tmp/browser-operator-gcp-provision.log; state will be +updater-test/cloud/vm-state.json. Full cloud test awaits deployment/HTTPS and +native client configuration. Official updater constants_prod does NOT load +developer overrides.json; do not weaken its localhost-only test override guard. +For cloud, use a separately built HTTPS updater configuration (same test keys), +not certificate bypasses or disabled CUP. Need GitHub release hosting as selected. + +## Completed real cloud qualification (2026-11-09) + +The private Omaha service at commit 104ed61 was deployed behind nginx with a +trusted IP certificate. Actual Chromium CUP validation passed through HTTPS +(including a 4,907-byte proof header). A separate VM-generated CUP key was +compiled into the native HTTPS updater; local package-signing CRX keys stayed +on the Mac. Native official updater developer URL guards were not weakened. + +Both HTTPS test DMGs were independently signed/notarized/stapled and passed +mounted functional, signature and Gatekeeper tests: + +- Baseline 158 DMG SHA256: + e7a73526e29e94c453632039cfd7e176769f587b5d8d436d25f78ea7f259c01c. + This is a genuine frozen 158 engine with the separately built 159 HTTPS helper; + its composition manifest records both build origins without relabeling 158. +- Target 159 DMG SHA256: + d3e231ade2e06fd8fec39900e504670e2afb39feea3f9ff5426747f4266fc999. +- Cloud update CRX SHA256: + 6b49d4b9dce7eeab06d45a9ee660c7b272ca9c8f771651b681748c39f9d9e3dc. + Download size 173996709 bytes; native download metrics recorded success in + 9078 ms, pinned CRX verification passed, rsyncs completed, and native 159 + relaunch retained bookmark UUID ad12f6ed-eb20-52e8-ab9a-52c2549b9721. + +The fresh 158 setup used normal Launch Services and installed helper CDHash +62b171343bf083a0b40aab2e227515d665667257 with a healthy wake launch agent. With +the cloud feed activated, the native periodic launchd job updated 158 to 159; +the service observed both the 158 offer and the subsequent 159 noupdate check. +Strict signatures, Apple's ticket and Gatekeeper passed after installation. +The original /Applications app executable and Info.plist hashes were rechecked +unchanged. No personal profile or macOS privacy settings changed. + +The actual GitHub publishing run found that draft releases may not yet have a +resolvable tag. The script now retrieves the draft by release ID, resumes only +explicit unchanged drafts, refuses to clobber assets, and verifies every asset's +remote SHA256/size before publishing a prerelease. This recovery path PASSED +against GitHub. Publication and cloud catalog activation remained separate. + +Local evidence: cloud-158-to-159-qualification (before/after, cloud service log, +periodic native updater log and report), cloud-baseline-verification, and +cloud-post-upgrade-verification, all under /Users/tyson/chromium/updater-test. +Production promotion, updater self-update, remote CircleCI execution and other +architectures/platforms remain unqualified. Review guide: +docs/chromium-change-review.md. + +## Interactive repeat-test reset (2026-11-09) + +A running 158 instance from /Volumes/Browser Operator was sharing the test app +ID with the already-upgraded 159 installation. The own-scope updater remained +registered to /Users/tyson/chromium/updater-test/install/Browser Operator.app at +159.0.8144.0; the cloud therefore correctly received 159 and returned noupdate, +while the disk-image browser window still showed 158. This does not demonstrate +a failed cloud version offer. Avoid testing updates from a read-only DMG or +using an old copy against a previously upgraded shared registration. + +Closed the DMG instance via the native app menu, preserved the 159 fixture and +profile under before-interactive-158.noindex, restored the signed/notarized +cloud 158 baseline and its saved test profile, and re-registered only the owned +test controller to version 158 at that install path. The cloud feed was briefly +paused for reset, then restored. Signature/ticket/Gatekeeper, helper identity, +launch agent and registration checks passed. UI update remains for the user to +trigger; do not claim that interactive check passed until observed. + +The repeat installer now has --prepare-only (requires --preserve-controller), +which skips opening About and explicitly records native_about_check as pending. +It also waits for Register's asynchronous prefs commit before comparing the +persisted version/path; the RPC may finish before that file is updated. Report: +/Users/tyson/chromium/updater-test/interactive-158-baseline-install.json. + +The guarded qualification group in the frontend BUILD.gn must appear AFTER +vars.gni imports define build_with_chromium. Actual native Intel GN generation +caught the earlier undefined-variable ordering error; moving the group after +imports passes both standalone and native generation. diff --git a/docs/chromium-macos-release-pipeline.md b/docs/chromium-macos-release-pipeline.md new file mode 100644 index 0000000000..185852aab1 --- /dev/null +++ b/docs/chromium-macos-release-pipeline.md @@ -0,0 +1,131 @@ +# macOS shipping workflow and CircleCI review + +Current review (2026-11-09): changes are pushed in draft PR +https://github.com/tysonthomas9/test-github-pipeline/pull/7. It also includes +opt-in native updater packaging and test-prerelease publishing, disabled by +default. Select enable_test_updater=true, an updater-enabled release_gn_config, +and publish_test_update=true plus a unique update_test_tag for a test upload. +Publication specifically requires chromium-autoupdate-cloud-test-mac-arm64.gn; +loopback configurations, unreadable keys and invalid Git tag refs are rejected +before build/signing. Direct publication also rejects loopback manifests. +The prepared signing runner needs local CRX_PRIVATE_KEY/CRX_PUBLIC_KEY paths and +GitHub repo authorization. HTTPS cloud test configuration must be generated on +the runner first; it is ephemeral and not committed. Publication never +activates Omaha. Bash 3.2 syntax/empty-array and YAML parsing checks passed; +CircleCI server validation/remote execution are still pending. Commits use +[skip ci] to avoid launching the existing expensive default jobs for review. + +The original audit below was recorded 2026-11-07 (America/Los_Angeles); references +to local/unpushed changes describe that historical checkpoint. + +## Existing workflow inspected + +Repository: `tysonthomas9/test-github-pipeline`, branch +`feature/mac-sign-notarize`, revision +`30c759099085d7181f9815fd7c6b29fd89fa59a2`. +Local checkout: `/Users/tyson/codebase/test-github-pipeline`. + +Inspected `.circleci/config.yml`, `CIRCLECI_TO_MAC_BUILD_PARITY.md`, +`mac-build-arm64.sh`, `mac-build-universal-and-sign.sh`, and +`mac-sign-notarize.sh`, plus the older `test-chromium` Mac release script. + +The original configuration on this branch contained Linux and Windows jobs, +with Mac scripts present separately. Added a **local, opt-in** Mac shipping +workflow below. No CircleCI job was triggered and no remote workflow was +changed during this local release. + +The older **`feature/mac-build`** branch at +`fffcdbe33291ddadc35bf031152f836d97dc67db` **does contain** a +`build-chromium-macos` job, scheduled alongside Linux and Windows. It uses the +existing self-hosted resource class **`tysonthomas9/macos`**, fetches the latest +Beta version, builds ARM64 and x64, and creates a universal app. Its signing +step is optional blanket `codesign --deep --force`; it creates a DMG/ZIP but +does not notarize or staple them. That earlier job is not equivalent to a +fully validated distribution release. + +The current release follows the later branch's generated nested-signing and +notarytool workflow, with pinned stable source and mandatory final checks. It +targets ARM64 and must not be labeled universal. The reviewed commit had no +GitHub commit-status entries available; that is not evidence of a successful +CircleCI run. Cloud pipeline execution has not been validated here. + +The local `.circleci/config.yml` now defines +`build-browser-operator-macos-shipping` on the existing `tysonthomas9/macos` +runner. Set pipeline parameter **`run_macos_release=true`** to select that +workflow; the default remains Linux/Windows. The Mac workflow verifies the +prepared source against **`chromium_version`** (default `158.0.8127.18`), calls +`mac-release-shipping.sh`, and collects only the verified DMG, manifest, +Gatekeeper results, and final verification reports. Each CI build gets a +distinct release output directory. + +YAML parsing, opt-in workflow structure, and every new shell step passed local +validation. CircleCI CLI/server schema validation and an actual cloud job have +not been run. The self-hosted runner must have the prepared source/frontend, +tools, signing identity, and authenticated keychain profile described below. + +Two other issues in the reviewed Linux job are recorded for a separate CI fix: +it computes `PGO_ARGS` without including them in its GN command, and its build +command invokes the Windows `mini_installer` target. The local ARM64 shipping +runner uses explicit PGO settings and macOS browser/packaging targets instead. + +The ARM64 script correctly builds both `chrome` and `chrome/installer/mac`. +The signing script correctly uses Chromium's generated nested signing pipeline +and a `notarytool` keychain profile. The shipping runner retains those stages +and adds explicit validation of optimization flags, final signatures, +notarization tickets, Gatekeeper approval, mounted-DMG browser tools, and About. + +## Shipping entrypoints + +For an already synced, patched Chromium checkout linked to this frontend: + +```sh +python3 scripts/build_chromium_release.py \ + --chromium-src /Users/tyson/chromium/src --jobs 6 --min-free-gib 5 \ + --log /private/tmp/browser-operator-158-shipping-build.log + +python3 scripts/package_chromium_release.py \ + --chromium-src /Users/tyson/chromium/src \ + --output /Users/tyson/chromium/releases/158.0.8127.18-arm64 \ + --keychain-profile tthoma9 +``` + +The existing pipeline checkout also has a `mac-release-shipping.sh` entrypoint +that delegates to the updated shared build, packaging, and verification +scripts. A prepared self-hosted macOS CircleCI job can invoke that entrypoint. +The runner needs its own signing identity, authenticated notarytool profile, +prepared source/dependencies/frontend, Python 3.11+, Node.js, and Xcode. + +This release targets **ARM64**. Existing x64/universal scripts remain separate; +the final ARM64 DMG must not be labeled universal. + +## Changes from the older local workflow + +- Enable `is_official_build=true`, disable debug/component/runtime DCHECKs, + and use the exact Chromium ARM64 and V8 PGO profiles. ThinLTO remains off to + bound memory on this 16 GB Mac. +- Enable full DevTools type checking. Remove unreachable onboarding statements + caught by the stricter preflight, rather than skipping the check. +- Apply the sixth version-specific patch for Settings branding and an honest + manual-update status. Updater-disabled is neither an error nor an up-to-date + claim; a real updater is not configured by this release task. +- Apply the seventh patch for remaining product display names and macOS + file-type descriptions, preserving attribution and internal identifiers. +- Generate packaging tools as part of the browser build. Refuse to sign when + Ninja still has outstanding work or when effective shipping flags differ. +- Use Chromium's nested signing and hardened-runtime entitlements without + `--development` or debug-attach entitlements. Sign a staged copy of the app. +- Defer the pre-notarization Gatekeeper check, then require final app **and** + DMG Gatekeeper acceptance after notarization and stapling. The old script's + tolerated `spctl` failure does not count as final validation. +- Use a visible `Applications` shortcut in non-Google-branded DMGs. +- Use the shared APFS image adapter and verify the mounted app before DMG + submission. On this Mac, the legacy HFS hybrid path introduced FinderInfo + metadata after signing; Apple's acceptance alone did not catch the resulting + strict-signature failure. +- Refuse to delete or overwrite existing release output. Preserve signing and + notarization logs, a SHA-256 manifest, About-page results, screenshots, and + bundled AI-tool test results. + +Apple initially returned HTTP 403 for an outstanding developer agreement. The +user accepted the agreement; a subsequent authenticated history request passed. +No credentials are embedded in scripts or notes. diff --git a/docs/chromium-universal-macos-build.md b/docs/chromium-universal-macos-build.md new file mode 100644 index 0000000000..1b08f188ae --- /dev/null +++ b/docs/chromium-universal-macos-build.md @@ -0,0 +1,25 @@ +# Historical Chromium 159 universal build inputs + +This is the earlier test-build checkpoint, superseded by +[the Chromium 158 production release workflow](chromium-158-production-universal.md). +The requested distribution engine is now 158.0.8127.18; do not substitute these +159 test binaries for the production build. + +The Intel 159.0.8144.0 compile completed successfully. Its immutable inputs are +`/Users/tyson/chromium/updater-test/159-cloud-x64-frozen-input`; the ARM64 test +inputs remain at `/Users/tyson/chromium/updater-test/159-cloud-frozen-input`. +Source revision: f19f8ee8a6b566fbd0cea6bdf05e284712cba9b9. These use temporary +qualification updater identities, not the permanent production endpoint. + +These historical inventories predate the native/frontend source-state and +resolved trust fields now required by the generic merger. They cannot be +passed directly to the production merge command or upgraded by inventing +metadata. A new verified freeze from the matching source is required. +The regenerable 159 output directories were removed after verifying both +immutable snapshots to free storage for the requested 158 rebuild. + +Current scripts include architecture-specific build configs, automatic updater +target selection, verified freeze/merge and ARM64/universal signing, notarization +and mounted per-CPU tests. See the current workflow above for commands. The +two targeted upstream DevTools security fixes are tracked separately in PR106. +Rosetta execution and physical Intel hardware qualification remain distinct. diff --git a/docs/devtools-security-backports.md b/docs/devtools-security-backports.md new file mode 100644 index 0000000000..57625aff7e --- /dev/null +++ b/docs/devtools-security-backports.md @@ -0,0 +1,62 @@ +# DevTools security backports (2026-11-09) + +This change backports the two missing frontend security fixes confirmed in the +initial audit. It is not a complete upstream DevTools update or an exhaustive +security audit. The fork's last observed upstream parent was +`5a64dbbf418936d4cf83b30e070da8c855dfbfd8` (2025-10-07); Chromium 159 pins +`e1df1f10d345d52b88827564aa71ec3ea8462151`. + +## Upstream provenance and adaptation + +- [22f74fbeb2860d02b55f6481baf352006c158b9f](https://chromium.googlesource.com/devtools/devtools-frontend/+/22f74fbeb2860d02b55f6481baf352006c158b9f) + (2026-05-19, bug 513758833): keep editable suggestion text inert on focus by + assigning `textContent`, rather than parsing it through `innerHTML`. The + production fix is copied verbatim. +- [c98961307b92b731acef5fee919d915eef4086d8](https://chromium.googlesource.com/devtools/devtools-frontend/+/c98961307b92b731acef5fee919d915eef4086d8) + (2026-05-26, bug 514023351): construct a font-face rule through `CSSStyleSheet` + and serialize its properties, quoting the URL with `JSON.stringify`. Adapted + to the fork's imperative `FontView.onFontContentLoaded`; its existing content + loading and preview sizing lifecycle is retained. Upstream's charset injection + regression is adapted to this lifecycle, with fallback-URL, quote/backslash, + and normal-input coverage added. + +No `front_end/panels/ai_chat` files or dependencies are changed. Its Git tree +remains `ae68eac380f22e20a71a72efceb2a757acf00959` relative to the PR base +`e1260c380ba06d0bb2a1a96d2a4f87daf55d1781`. + +## Validation + +The original five new tests were first run without the production fixes: the +HTML case and both malicious font URL cases failed (3 failures), while ordinary +text and font rule cases passed (2 successes). Applying the fixes made all 5 +pass. A sixth regression covers literal quotes and backslashes in fallback URLs. +All 18 tests in the combined suggestion-input and source-frame suites pass, +including the existing WebAssembly disassembly tests. Their worker entrypoint +must be built for the standalone test environment. +Tests use the actual Karma/Puppeteer harness with a disposable headless profile, +not mocked DOM or CSS parsing. Browser executable: signed Browser Operator 158 +on macOS arm64. Full TypeScript checking was enabled for the targeted GN build. +Repository lint passed on the changed TypeScript files. + +The standalone frontend build used `use_siso=false devtools_bundle=false + devtools_skip_typecheck=false`. Build the test dependencies and runtime assets: + +```sh +ninja -C out/SecurityFixes -j 1 \ + front_end/ui/components/suggestion_input:unittests \ + front_end/ui/legacy/components/source_frame:unittests \ + front_end/core/i18n/locales:locales \ + front_end/entrypoints/wasmparser_worker:worker_entrypoint \ + test/unit:karma test:run + +python3 third_party/node/node.py --output scripts/run_on_target.mjs \ + --target SecurityFixes gen/test/run.js --skip-ninja --headless \ + --chrome-binary "/path/to/Browser Operator.app/Contents/MacOS/Browser Operator" \ + front_end/ui/components/suggestion_input \ + front_end/ui/legacy/components/source_frame +``` + +The security branch was developed in a separate worktree based on the native +macOS updater PR. The Intel Chromium build started earlier uses the original +frontend checkout. Existing DMGs and that build do not contain these backports; +packaged-app validation requires a subsequent build containing this change. diff --git a/front_end/BUILD.gn b/front_end/BUILD.gn index 7201cc26a7..067bbc5e19 100644 --- a/front_end/BUILD.gn +++ b/front_end/BUILD.gn @@ -253,6 +253,7 @@ group("unittests") { "ui/components/request_link_icon:unittests", "ui/components/settings:unittests", "ui/components/snackbars:unittests", + "ui/components/suggestion_input:unittests", "ui/components/survey_link:unittests", "ui/components/switch:unittests", "ui/components/text_editor:unittests", diff --git a/front_end/core/root/Runtime.ts b/front_end/core/root/Runtime.ts index f3e3656280..8562f73540 100644 --- a/front_end/core/root/Runtime.ts +++ b/front_end/core/root/Runtime.ts @@ -518,6 +518,7 @@ interface DevToolsStartingStyleDebugging { * @see hostConfig */ export type HostConfig = Platform.TypeScriptUtilities.RecursivePartial<{ + browserOperatorUpdates: {enabled: boolean}, aidaAvailability: AidaAvailability, channel: Channel, devToolsConsoleInsights: HostConfigConsoleInsights, diff --git a/front_end/panels/ai_chat/BUILD.gn b/front_end/panels/ai_chat/BUILD.gn index 2b994b4212..263a52539f 100644 --- a/front_end/panels/ai_chat/BUILD.gn +++ b/front_end/panels/ai_chat/BUILD.gn @@ -90,7 +90,7 @@ devtools_module("ai_chat") { "core/AgentService.ts", "core/Constants.ts", "core/BuildConfig.ts", - "core/GraphConfigs.ts", + "core/GraphConfigs.ts", "core/ConfigurableGraph.ts", "core/BaseOrchestratorAgent.ts", "core/AgentDescriptorRegistry.ts", @@ -282,6 +282,9 @@ devtools_module("ai_chat") { deps = [ ":css_files", "../../core/common:bundle", + "../../core/root:bundle", + "../../core/platform:bundle", + "../../core/host:bundle", "../../core/i18n:bundle", "../../core/sdk:bundle", "../../generated:protocol", @@ -299,288 +302,9 @@ devtools_module("ai_chat") { ] } -# List of source files also used to determine JS outputs for metadata -_ai_chat_sources = [ - "core/AgentStorageManager.ts", - "core/AgentStudioIntegration.ts", - "core/AgentTestRunner.ts", - "ui/AIChatPanel.ts", - "ui/ChatView.ts", - "ui/message/MessageList.ts", - "ui/message/UserMessage.ts", - "ui/message/ModelMessage.ts", - "ui/message/ToolResultMessage.ts", - "ui/message/MessageCombiner.ts", - "ui/message/GlobalActionsRow.ts", - "ui/markdown/MarkdownRenderers.ts", - "ui/model_selector/ModelSelector.ts", - "ui/input/ChatInput.ts", - "ui/input/InputBar.ts", - "ui/oauth/OAuthConnectPanel.ts", - "ui/version/VersionBanner.ts", - "ui/LiveAgentSessionComponent.ts", - "ui/ToolCallComponent.ts", - "ui/ToolResultComponent.ts", - "ui/AgentSessionHeaderComponent.ts", - "ui/ToolDescriptionFormatter.ts", - "ui/HelpDialog.ts", - "ui/PromptEditDialog.ts", - "ui/SettingsDialog.ts", - "ui/OnboardingDialog.ts", - "ui/onboardingStyles.ts", - "ui/settings/types.ts", - "ui/settings/constants.ts", - "ui/settings/i18n-strings.ts", - "ui/settings/utils/validation.ts", - "ui/settings/utils/storage.ts", - "ui/settings/utils/styles.ts", - "ui/settings/components/ModelSelectorFactory.ts", - "ui/settings/components/SettingsHeader.ts", - "ui/settings/components/SettingsFooter.ts", - "ui/settings/components/AdvancedToggle.ts", - "ui/settings/providers/BaseProviderSettings.ts", - "ui/settings/providers/GenericProviderSettings.ts", - "ui/settings/providers/LiteLLMSettings.ts", - "ui/settings/providers/OpenRouterSettings.ts", - "ui/settings/providerConfigs.ts", - "ui/settings/advanced/MCPSettings.ts", - "ui/settings/advanced/BrowsingHistorySettings.ts", - "ui/settings/advanced/VectorDBSettings.ts", - "ui/settings/advanced/TracingSettings.ts", - "ui/settings/advanced/EvaluationSettings.ts", - "ui/settings/advanced/MemorySettings.ts", - "ui/EvaluationDialog.ts", - "ui/WebAppCodeViewer.ts", - "ui/TodoListDisplay.ts", - "ui/FileListDisplay.ts", - "ui/FileContentViewer.ts", - "ui/ConversationHistoryList.ts", - "ui/conversationHistoryStyles.ts", - "ui/CustomProviderDialog.ts", - "ui/customProviderStyles.ts", - "ui/mcp/MCPConnectionsDialog.ts", - "ui/mcp/MCPConnectorsCatalogDialog.ts", - "ui/SchemaEditor.ts", - "ui/AgentStudioView.ts", - "ui/AgentStudioController.ts", - "ui/AgentStudioBridge.ts", - "ui/agent_studio/AgentStudioSPA.ts", - "ai_chat_impl.ts", - "models/ChatTypes.ts", - "persistence/ConversationTypes.ts", - "persistence/ConversationStorageManager.ts", - "persistence/ConversationManager.ts", - "memory/types.ts", - "memory/MemoryModule.ts", - "memory/MemoryBlockManager.ts", - "memory/MemoryAgentConfig.ts", - "memory/index.ts", - "core/Graph.ts", - "core/State.ts", - "core/Types.ts", - "core/AgentService.ts", - "core/Constants.ts", - "core/BuildConfig.ts", - "core/GraphConfigs.ts", - "core/ConfigurableGraph.ts", - "core/BaseOrchestratorAgent.ts", - "core/AgentDescriptorRegistry.ts", - "core/PageInfoManager.ts", - "core/AgentNodes.ts", - "core/GraphHelpers.ts", - "core/LLMConfigurationManager.ts", - "core/CustomProviderManager.ts", - "core/ToolNameMap.ts", - "core/ToolSurfaceProvider.ts", - "core/StateGraph.ts", - "core/Logger.ts", - "core/AgentErrorHandler.ts", - "core/Version.ts", - "core/VersionChecker.ts", - "LLM/LLMTypes.ts", - "LLM/LLMProvider.ts", - "LLM/LLMProviderRegistry.ts", - "LLM/LLMErrorHandler.ts", - "LLM/LLMResponseParser.ts", - "LLM/FuzzyModelMatcher.ts", - "LLM/OpenAIProvider.ts", - "LLM/LiteLLMProvider.ts", - "LLM/GroqProvider.ts", - "LLM/OpenRouterProvider.ts", - "LLM/BrowserOperatorProvider.ts", - "LLM/CerebrasProvider.ts", - "LLM/AnthropicProvider.ts", - "LLM/GoogleAIProvider.ts", - "LLM/GenericOpenAIProvider.ts", - "LLM/MessageSanitizer.ts", - "LLM/LLMClient.ts", - "tools/Tools.ts", - "tools/GetAccessibilityTreeToolV0.ts", - "tools/LLMTracingWrapper.ts", - "tools/CritiqueTool.ts", - "tools/FetcherTool.ts", - "tools/FinalizeWithCritiqueTool.ts", - "tools/VisitHistoryManager.ts", - "tools/HTMLToMarkdownTool.ts", - "tools/ReadabilityExtractorTool.ts", - "tools/SchemaBasedExtractorTool.ts", - "tools/StreamlinedSchemaExtractorTool.ts", - "tools/CachedSchemaExtractorTool.ts", - "tools/selector_cache/SelectorCache.ts", - "tools/selector_cache/types.ts", - "tools/action_cache/types.ts", - "tools/action_cache/ActionPatternCache.ts", - "tools/action_cache/ActionPatternCapture.ts", - "tools/CombinedExtractionTool.ts", - "tools/FullPageAccessibilityTreeToMarkdownTool.ts", - "tools/VectorDBClient.ts", - "tools/BookmarkStoreTool.ts", - "tools/DocumentSearchTool.ts", - "tools/FileStorageManager.ts", - "tools/CreateFileTool.ts", - "tools/UpdateFileTool.ts", - "tools/DeleteFileTool.ts", - "tools/ReadFileTool.ts", - "tools/ListFilesTool.ts", - "memory/SearchMemoryTool.ts", - "memory/UpdateMemoryTool.ts", - "memory/ListMemoryBlocksTool.ts", - "tools/UpdateTodoTool.ts", - "tools/ExecuteCodeTool.ts", - "tools/SequentialThinkingTool.ts", - "tools/ThinkingTool.ts", - "tools/RenderWebAppTool.ts", - "tools/GetWebAppDataTool.ts", - "tools/RemoveWebAppTool.ts", - "tools/SaveResearchReportTool.ts", - "tools/SearchCustomAgentsTool.ts", - "tools/CallCustomAgentTool.ts", - "tools/VisualIndicatorTool.ts", - "tools/HybridAccessibilityTreeTool.ts", - "tools/DOMToolsRegistration.ts", - "tools/SearchTool.ts", - "tools/TryCachedActionTool.ts", - "tools/search/types.ts", - "tools/search/SearchPatternCache.ts", - "tools/search/SearchStrategy.ts", - "dom/ShadowPiercer.ts", - "dom/ComposedTreeResolver.ts", - "dom/ElementResolver.ts", - "dom/shadow-piercer-runtime.ts", - "dom/EnhancedElementResolver.ts", - "dom/index.ts", - "cdp/CDPSessionAdapter.ts", - "cdp/DirectCDPAdapter.ts", - "cdp/SDKTargetAdapter.ts", - "cdp/getAdapter.ts", - "cdp/index.ts", - "cdp/FrameRegistryUniversal.ts", - "a11y/FrameRegistry.ts", - "a11y/HybridSnapshot.ts", - "a11y/HybridSnapshotUniversal.ts", - "tools/mini_app/ListMiniAppsTool.ts", - "tools/mini_app/LaunchMiniAppTool.ts", - "tools/mini_app/GetMiniAppStateTool.ts", - "tools/mini_app/UpdateMiniAppStateTool.ts", - "tools/mini_app/ExecuteMiniAppActionTool.ts", - "tools/mini_app/CloseMiniAppTool.ts", - "mini_apps/types/MiniAppTypes.ts", - "mini_apps/MiniAppRegistry.ts", - "mini_apps/GenericMiniAppBridge.ts", - "mini_apps/MiniAppStorageManager.ts", - "mini_apps/MiniAppEventBus.ts", - "mini_apps/MiniAppInitialization.ts", - "mini_apps/apps/agent_studio/AgentStudioMiniApp.ts", - "agent_framework/ConfigurableAgentTool.ts", - "agent_framework/AgentRunner.ts", - "agent_framework/AgentRunnerEventBus.ts", - "agent_framework/AgentSessionTypes.ts", - "agent_framework/RuntimeContext.ts", - "agent_framework/implementation/ConfiguredAgents.ts", - "agent_framework/implementation/agents/ActionAgent.ts", - "agent_framework/implementation/agents/ActionAgentV1.ts", - "agent_framework/implementation/agents/ActionAgentV2.ts", - "agent_framework/implementation/agents/ActionVerificationAgent.ts", - "agent_framework/implementation/agents/AgentVersion.ts", - "agent_framework/implementation/agents/ClickActionAgent.ts", - "agent_framework/implementation/agents/ContentWriterAgent.ts", - "agent_framework/implementation/agents/DirectURLNavigatorAgent.ts", - "agent_framework/implementation/agents/EcommerceProductInfoAgent.ts", - "agent_framework/implementation/agents/FormFillActionAgent.ts", - "agent_framework/implementation/agents/HoverActionAgent.ts", - "agent_framework/implementation/agents/KeyboardInputActionAgent.ts", - "agent_framework/implementation/agents/ResearchAgent.ts", - "agent_framework/implementation/agents/ScrollActionAgent.ts", - "agent_framework/implementation/agents/SearchAgent.ts", - "agent_framework/implementation/agents/WebTaskAgent.ts", - "evaluation/framework/types.ts", - "evaluation/framework/judges/LLMEvaluator.ts", - "evaluation/framework/GenericToolEvaluator.ts", - "evaluation/framework/MarkdownReportGenerator.ts", - "evaluation/utils/SanitizationUtils.ts", - "evaluation/utils/ErrorHandlingUtils.ts", - "evaluation/utils/EvaluationTypes.ts", - "evaluation/utils/PromptTemplates.ts", - "evaluation/utils/ResponseParsingUtils.ts", - "evaluation/test-cases/schema-extractor-tests.ts", - "evaluation/test-cases/streamlined-schema-extractor-tests.ts", - "evaluation/test-cases/research-agent-tests.ts", - "evaluation/test-cases/action-agent-tests.ts", - "evaluation/test-cases/action-agent-shadow-dom-tests.ts", - "evaluation/test-cases/action-agent-iframe-tests.ts", - "evaluation/test-cases/cdp-tool-tests.ts", - "evaluation/test-cases/web-task-agent-tests.ts", - "evaluation/test-cases/web-task-agent-shadow-dom-tests.ts", - "evaluation/test-cases/web-task-agent-iframe-tests.ts", - "evaluation/test-cases/html-to-markdown-tests.ts", - "evaluation/test-cases/index.ts", - "evaluation/runner/EvaluationRunner.ts", - "evaluation/runner/VisionAgentEvaluationRunner.ts", - "common/MarkdownViewerUtil.ts", - "common/utils.ts", - "common/utils-universal.ts", - "common/xpath-builder.ts", - "common/geometry-helpers.ts", - "common/mouse-helpers.ts", - "common/log.ts", - "common/context.ts", - "common/page.ts", - "common/WebSocketRPCClient.ts", - "common/EvaluationConfig.ts", - "common/accessibility-tree-search.ts", - "utils/ContentChunker.ts", - "vendor/readability-source.ts", - "evaluation/remote/EvaluationProtocol.ts", - "evaluation/remote/EvaluationAgent.ts", - "tracing/TracingProvider.ts", - "tracing/LangfuseProvider.ts", - "tracing/TracingConfig.ts", - "auth/PKCEUtils.ts", - "auth/OpenRouterOAuth.ts", - "mcp/MCPConfig.ts", - "mcp/MCPToolAdapter.ts", - "mcp/MCPRegistry.ts", - "mcp/MCPMetaTools.ts", -] - -# Construct the expected JS output paths for the metadata -_ai_chat_js_outputs_for_metadata = [] -_ai_chat_module_target_gen_dir = get_label_info(":ai_chat", "target_gen_dir") - -foreach(src, _ai_chat_sources) { - _extension = get_path_info(src, "extension") - _relative_file_name = rebase_path(src, ".") - _fileName = get_path_info(_relative_file_name, "dir") + "/" + - get_path_info(_relative_file_name, "name") - - # Only consider .ts files that aren't definition files (.d.ts) and .js files - if ((_extension == "ts" && - get_path_info(get_path_info(src, "name"), "extension") != "d") || - _extension == "js") { - _ai_chat_js_outputs_for_metadata += - [ "$_ai_chat_module_target_gen_dir/${_fileName}.js" ] - } -} +# Derive release resources from actual compiler outputs, including new main modules. +_ai_chat_js_outputs_for_metadata = + filter_include(get_target_outputs(":ai_chat"), [ "*.js" ]) # This target generates the metadata needed for the release GRD check generated_file("ai_chat_release_js_metadata") { diff --git a/front_end/panels/ai_chat/Readme.md b/front_end/panels/ai_chat/Readme.md index 5bc732b764..a9a9c82f86 100644 --- a/front_end/panels/ai_chat/Readme.md +++ b/front_end/panels/ai_chat/Readme.md @@ -2,6 +2,45 @@ This panel is a Multi-Agent Framework that allows a user to connect an existing LLM with the chromium browser. +### Develop with a local Chromium fork (macOS) + +With a synced Chromium checkout at `~/chromium/src`, install frontend dependencies +and start the development browser from the repository root: + +```sh +npm install --legacy-peer-deps --package-lock=false --registry=https://registry.npmjs.org +npm run chromium:dev +``` + +The launcher reuses Chromium's local GN, Ninja, Node, and esbuild tools. It builds +the unbundled frontend, serves it at `http://127.0.0.1:8000/`, and opens DevTools +in a separate development profile at `out/browser-operator-profile`. Select the +**AI Assistant** panel and configure your model provider in its settings. + +Compiled Browser Operator or Chromium apps under `~/chromium/src/out/{BrowserOperator,Default,Release,Debug}` +are preferred. If none exists, the launcher uses an installed Browser Operator, +Chromium, or Chrome app and prints the chosen executable. It does not compile +the Chromium browser itself or replace the fork's bundled DevTools source. + +```sh +# Use a specific compiled fork and checkout. +npm run chromium:dev -- --chromium-src /path/to/chromium/src \ + --browser '/path/to/Chromium.app/Contents/MacOS/Chromium' + +# Reopen the existing frontend build; rebuild after changing source files. +npm run chromium:dev -- --skip-build + +# Build without opening a browser, optionally with full TypeScript checking. +npm run chromium:dev -- --build-only +npm run chromium:dev -- --build-only --typecheck +``` + +The default development build transpiles with esbuild and skips TypeScript +checking, matching Chromium's development default. Resource manifest checks +still run. Use `--port` and `--debug-port` to avoid local port conflicts. +Remote debugging binds to loopback. Stop the launcher with Ctrl+C to close its +browser and server. A first launch may show a macOS Keychain prompt. + ### Docker ```sh # assuming you are running from the root "browser-operator-core" directory diff --git a/front_end/panels/ai_chat/core/Version.ts b/front_end/panels/ai_chat/core/Version.ts index 90df2138ad..adc1f3c6c8 100644 --- a/front_end/panels/ai_chat/core/Version.ts +++ b/front_end/panels/ai_chat/core/Version.ts @@ -3,8 +3,8 @@ // found in the LICENSE file. export const VERSION_INFO = { - version: '0.6.0', - buildDate: '2025-12-09', + version: '0.7.0', + buildDate: '2026-11-10', channel: 'stable' } as const; diff --git a/front_end/panels/ai_chat/core/VersionChecker.ts b/front_end/panels/ai_chat/core/VersionChecker.ts index 6480c32e09..dc5bce93e9 100644 --- a/front_end/panels/ai_chat/core/VersionChecker.ts +++ b/front_end/panels/ai_chat/core/VersionChecker.ts @@ -17,8 +17,8 @@ export interface VersionInfo { export class VersionChecker { private static instance: VersionChecker; - private readonly GITHUB_API_URL = 'https://api.github.com/repos/tysonthomas9/browser-operator-devtools-frontend/releases/latest'; - private readonly RELEASE_URL = 'https://github.com/tysonthomas9/browser-operator-devtools-frontend/releases'; + private readonly GITHUB_API_URL = 'https://api.github.com/repos/BrowserOperator/browser-operator-core/releases/latest'; + private readonly RELEASE_URL = 'https://github.com/BrowserOperator/browser-operator-core/releases'; private readonly CHECK_INTERVAL = 24 * 60 * 60 * 1000; // 24 hours private readonly STORAGE_KEY = 'devtools-version-check'; private currentVersion: string; @@ -183,4 +183,4 @@ export class VersionChecker { logger.error('Failed to clear cache:', error); } } -} \ No newline at end of file +} diff --git a/front_end/panels/ai_chat/ui/ChatView.ts b/front_end/panels/ai_chat/ui/ChatView.ts index 8491ed268d..be1db53821 100644 --- a/front_end/panels/ai_chat/ui/ChatView.ts +++ b/front_end/panels/ai_chat/ui/ChatView.ts @@ -5,6 +5,9 @@ import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js'; import * as Lit from '../../../ui/lit/lit.js'; import * as SDK from '../../../core/sdk/sdk.js'; +import * as Host from '../../../core/host/host.js'; +import type * as Platform from '../../../core/platform/platform.js'; +import type * as Root from '../../../core/root/root.js'; import * as BaseOrchestratorAgent from '../core/BaseOrchestratorAgent.js'; import { TIMING_CONSTANTS } from '../core/Constants.js'; import { PromptEditDialog } from './PromptEditDialog.js'; @@ -226,6 +229,7 @@ export class ChatView extends HTMLElement { // Add version info state #versionInfo: VersionInfo | null = null; #isVersionBannerDismissed = false; + #nativeUpdaterEnabled = false; connectedCallback(): void { const sheet = new CSSStyleSheet(); @@ -1223,6 +1227,16 @@ export class ChatView extends HTMLElement { // Method to check for updates async #checkForUpdates(): Promise { try { + const hostConfig = await new Promise(resolve => { + Host.InspectorFrontendHost.InspectorFrontendHostInstance.getHostConfig(resolve); + }); + if (hostConfig.browserOperatorUpdates?.enabled) { + this.#nativeUpdaterEnabled = true; + this.#versionInfo = null; + VersionChecker.getInstance().clearCache(); + void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender); + return; + } const versionChecker = VersionChecker.getInstance(); // Version is now automatically loaded from Version.ts @@ -1265,6 +1279,12 @@ export class ChatView extends HTMLElement { // Method to render version banner (delegates to component) #renderVersionBanner(): Lit.TemplateResult { + if (this.#nativeUpdaterEnabled) { + return html` Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab( + 'chrome://help/' as Platform.DevToolsPath.UrlString)} + >`; + } if (!this.#versionInfo || !this.#versionInfo.isUpdateAvailable || this.#isVersionBannerDismissed || this.#messages.length > 1) { return html``; } diff --git a/front_end/panels/ai_chat/ui/version/VersionBanner.ts b/front_end/panels/ai_chat/ui/version/VersionBanner.ts index 52bf18a2d1..3c804aa2f8 100644 --- a/front_end/panels/ai_chat/ui/version/VersionBanner.ts +++ b/front_end/panels/ai_chat/ui/version/VersionBanner.ts @@ -3,6 +3,7 @@ // found in the LICENSE file. import * as Lit from '../../../../ui/lit/lit.js'; +import { CURRENT_VERSION } from '../../core/Version.js'; const {html, Decorators} = Lit; const {customElement} = Decorators as any; @@ -17,18 +18,38 @@ export class VersionBanner extends HTMLElement { // Manual properties #info: VersionInfo | null = null; #dismissed = false; + #nativeUpdater = false; get info(): VersionInfo | null { return this.#info; } set info(value: VersionInfo | null) { this.#info = value; this.#render(); } get dismissed(): boolean { return this.#dismissed; } set dismissed(value: boolean) { this.#dismissed = value; this.#render(); } + get nativeUpdater(): boolean { return this.#nativeUpdater; } + set nativeUpdater(value: boolean) { this.#nativeUpdater = value; this.#render(); } connectedCallback(): void { this.#render(); } #dismiss = () => { this.dispatchEvent(new CustomEvent('dismiss', {bubbles: true})); }; #render(): void { - if (!this.#info || !this.#info.isUpdateAvailable || this.#dismissed) { this.#shadow.innerHTML = ''; return; } + if (this.#nativeUpdater) { + Lit.render(html` + +
Browser Operator ${CURRENT_VERSION} + +
+ `, this.#shadow, {host: this}); + return; + } + if (!this.#info || !this.#info.isUpdateAvailable || this.#dismissed) { Lit.render(Lit.nothing, this.#shadow, {host: this}); return; } const info = this.#info; Lit.render(html`