Repository navigation
Provision an isolated browser for the nightly reliability probe - #58
Merged
Merged
Conversation
The nightly probe assumed an AgentTab extension and native host were already provisioned in the runner's Chrome for Testing profile. The runner was never provisioned for v2, so every nightly since the v2 cutover failed with a missing IPC socket. The probe can now launch Chrome with a disposable profile that loads the freshly built development extension and a native messaging manifest for the freshly built host, then address that instance by process ID and remove it afterwards.
A browser executed directly by the runner is not registered with the login session and never answers Apple events, so start it with open(1) and find its process by profile. Enabling automation is a user-gesture grant, so the probe now uses a persistent provisioned profile and keeps only host state in a temporary directory.
The runner cannot address a LaunchServices application by process ID, so address the Chrome for Testing bundle and refuse to launch when another instance would make that address ambiguous.
This reverts commit 6eef177.
JXA reports a Chrome instance started with open -n as not running even though its windows are scriptable, so the launched probe skips that guard.
The runner cannot answer the macOS Automation consent that Apple events need, so the launched browser exposes a loopback DevTools endpoint and the probe reads chrome.tabs.query from the AgentTab service worker. Inspecting an already running Chrome still uses Apple events.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The nightly background-tab reliability probe assumed an AgentTab extension and native host were already installed in the runner's browser. They never were after the v2 cutover, so every nightly since then failed.
The probe can now launch its own Chrome for Testing with
--launch-chrome:chrome.tabs.queryover a loopback DevTools endpoint, because the runner cannot answer the macOS Automation consent that Apple events needWithout
--launch-chrome, the probe inspects an already running Chrome through Apple events as before. Runner provisioning is documented indocs/verification.md.Verification: a dispatched nightly on this branch passed (31 samples, no focus violations, clean teardown).