Repository navigation
parity-browser: pin the harness Chrome for Testing to 157 (#606) - #608
Conversation
The hosted gates launched the image's preinstalled Chrome for Testing. Image macos26 20261123 moved it from 157.0.8103.78 to 158.0.8127.36, the only change in that release a browser cell touches, and from then parity-browser failed 5 of 8 runs on CDP timeouts (a different case each time, on either host), where 8 of 8 on image 20261117 passed. A cell that answers in tens of milliseconds stalled for 3 to 6 s, its neighbours with it: one stalled renderer, not a slow job. hosted.sh now places the build pinned in scripts/repl-parity/hosted/ chrome-for-testing.json through the native matrix's placement (size and SHA-256 checked) and logs its version beside the image's. A newer Chrome comes in as a change to the pin. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
At ddae8d9, parity-browser passed 10 of 10 consecutive runs. Each ran once (attempt 1), with no reruns, and none failed. Every log shows Runner images:
The branch's own push run, 46103585756, also passed parity-browser. Before the pin, 5 of 8 runs on image 20261123 failed. Six clean runs in a row on that image would happen about 0.3% of the time at that failure rate. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook) |
…uate in the selector engine's world, so its line arrives on a busy Mac's hidden tab (cua 0.31.5) (#637) * #623: the locator diagnostic reads its matches in one evaluate, in the selector engine's world (cua 0.31.5) After a locator action fails, cua's client reads the matches for its "Locator diagnostics" line with an evaluateAll marked `diagnostic: true`, held by the service to a hard 1 s (#623). The service ran it on the user-facing route, which hands every match from the engine's world to the page's main world by its own CDP round trips: a DOM.describeNode and a DOM.resolveNode per match, about 507 commands for the parity cell's 251. The vendor's read-only path sends one evaluate. On Chrome for Testing 158 a new hidden tab is in the background band from its first command (#610), so the read ran out its 1 s and the line was left out: parity-browser's locator-contract-diagnostics-sampling failed on cua's lane in 1 of 3 runs on the 158 pin (#608). 157's loading-voter grace had hidden it. The handler now runs the diagnostic through the selector engine's one-call evaluateOnSelectorAll. The bound, the absence of a late answer and #623's arithmetic are unchanged. The engine's world may run it because cua's own client sends this script and it reads only DOM properties. User-facing evaluate and evaluateAll keep the main world, as the owner ruled. Tests (test/browser-service/locator-diagnostic.test.mjs, cua's real client through the service's command wrapper): - 251 matches: the diagnostic sends no per-match describeNode or resolveNode, and its line deep-equals what the cell expects. - User-facing evaluateAll still resolves every match into the main world and dispatches there once. - In a real headless Chrome, on a page that redefines tagName, textContent, disabled, getAttribute and getClientRects, the diagnostic reads the DOM's own values and calls none of the page's getters, while evaluateAll reads the page's. The real-Chrome helper's bounds now clear their timers, so a test file no longer stays open for 20 s after its last test. The per-match cost of user-facing evaluateAll is logged in tech-debt-tracker.md. Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68) * #623 fix wave: the service holds the locator diagnostic's code, bounds it in the page; a caller's script keeps the main world Review of 670968d (ruling: fix all three). P1: a caller could route its own script into the engine's world. Public locator.evaluateAll forwarded a caller's `diagnostic` option, and the handler ran any flagged script there, polled (a throwing script ran four times). Now: - The service holds the read (evaluate.mjs locatorDiagnostic) and never runs a request's script in the engine's world. - The diagnostic is asked for only as `diagnostic: true` with an empty script, which no caller's evaluateAll sends (isLocatorDiagnostic, also what index.mjs bounds hard). - A flagged request that carries a script of its own is an ordinary evaluate in the main world, run once. - cua's client asks through a private #locatorDiagnostic, and evaluateAll no longer forwards the option. - The parity cell's expected line is unchanged. P2: the read's result crossed CDP unbounded (role, type and aria-label in full). It now cuts every string to 120 characters in the page; boundResult stays as a backstop. P3: the real-Chrome helper's cleanup waited forever for a Chrome killed by a signal (exitCode null, signalCode set, 'exit' already fired). The new waitForExit checks both fields, SIGKILLs after 5 s and gives up after 10 s. Tests, each red first: - locator-diagnostic.test.mjs: a caller's flagged evaluateAll, and a raw flagged command with its own script, run in the main world once; a 300,000-character attribute crosses CDP cut to 120. - real-chrome-support.test.mjs: waitForExit returns for a signal-killed child and is bounded for one that never exits. The client's diagnostics scenario now names its vendor difference (vendorDiffers), which #623's flag already made. Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68) * #623 fix wave: the locator diagnostic is a shared script the client sends and the service recognises (parity's contract kept) 1d2fc3a asked for the diagnostic with an empty script. Parity's locator-boundary-action-diagnostics contract attests that the diagnostic command carries nonempty code (scriptPresent), so cua's lane failed api/browser-playwrightapi/elementinfo (run 46405042320). The read now lives in src/cua-api/locator-diagnostic.mjs, shared by the client and the service: - locatorDiagnostic: the in-page read, every string cut to 120. - LOCATOR_DIAGNOSTIC_SCRIPT: its script as evaluateAll would send it. The client sends that script marked `diagnostic: true`. The service recognises exactly that request (isLocatorDiagnostic) and runs the locatorDiagnostic it imports, in the engine's world. A flagged request whose script is any other runs in the main world, once. Run as an ordinary evaluate, the shared script gives the same answer. Tests: - locator-contracts.test.mjs: cua's own diagnostic request (the shared script, marked) is the observation the contract expects. - The bounds test and the client scenario send and expect the shared script. - The P1, P2 and P3 tests of 1d2fc3a are unchanged and pass. Gate parity-browser now also watches src/cua-api/locator-diagnostic.mjs. Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68) * #623 fix wave: the service keeps its own copy of the locator diagnostic (it loads only from its trusted paths) dc6a29a had the browser service import src/cua-api/locator-diagnostic.mjs. The service loads only from the launch's trusted code paths, which src/cua-api is not, so: - node_repl refused the import ("Trusted RPC dependency must resolve within a configured trusted code path"), and services-sky-trust.test.mjs failed on test-2; - repl-parity prepare failed in parity-browser and sandbox-denials (run 46409683424). The service now holds its own copy of the read and its script, in evaluate.mjs. The client keeps src/cua-api/locator-diagnostic.mjs, which the kernel reads. A new test holds the two scripts equal, so the client sends exactly the script the service recognises. Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…#608, #610) CI-opt kept the hosted gates' pin at 157.0.8103.78. The pin file is back to main's; the 158.0.8127.88 move this branch tried is gone. hosted.sh now says beside the pin why it stays: - 157's new-tab grace is Chrome for Testing's field-trial testing config (the loading voter), which a branded Chrome lacks. - On 158 the vendor host's lane, whose waits cua cannot change, stalls on backgrounded tabs. With cua's lane fixed (#623, #637), waitforurl's url cell still ran out its own 2.5 s, at 2533 ms, in 1 of 4 runs (ci-gate 46583607499). - So the pin protects the gate, not people. - It is to be revisited when the vendor's pinned runtime changes or when Chromium answers the request to keep a debugged tab's priority. ci-kit.yml's parity-browser comment says the same in brief. Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
|
Outcome: the hosted gates' Chrome for Testing pin stays at 157.0.8103.78 (CI-opt's decision). The reason is now written beside the pin in The runs on 158.0.8127.88, on d118a6e (main with #623's limits and #637's diagnostic fix), one at a time, no reruns:
cua can't change the vendor host's waits: it runs the pinned vendor runtime unmodified. So on 158 the gate would fail now and then for a reason that isn't cua's. Earlier, before #637, cua's own lane had failed Why 157 passes, and what that does and doesn't say (#610). 157's grace for a new hidden tab is Chrome for Testing's.
So the pin protects the gate, not people. The anti-throttling flags stay out of the gate, because they would hide what a person's Chrome does. When to revisit:
Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68) |
…n beside it (Chrome 158 stalls the vendor lane's own waits) (#647) * parity-browser: move the harness Chrome for Testing pin to 158.0.8127.88 (#608, #610) The hosted gates' Chrome for Testing pin moves from 157.0.8103.78 to the current Stable, 158.0.8127.88 (revision 1727472), the archive #610's hosted runs placed (size 200337306, SHA-256 6caf16b0...). #623 sized cua's own browser-service limits for 158's stall; the vendor host keeps its own. hosted.sh now says beside the pin what the 157 grace was: Chromium's loading voter, which a Chrome for Testing has on through the field-trial testing config and a branded Chrome has only by field trial. Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68) * parity-browser: the Chrome for Testing pin stays at 157, and says why (#608, #610) CI-opt kept the hosted gates' pin at 157.0.8103.78. The pin file is back to main's; the 158.0.8127.88 move this branch tried is gone. hosted.sh now says beside the pin why it stays: - 157's new-tab grace is Chrome for Testing's field-trial testing config (the loading voter), which a branded Chrome lacks. - On 158 the vendor host's lane, whose waits cua cannot change, stalls on backgrounded tabs. With cua's lane fixed (#623, #637), waitforurl's url cell still ran out its own 2.5 s, at 2533 ms, in 1 of 4 runs (ci-gate 46583607499). - So the pin protects the gate, not people. - It is to be revisited when the vendor's pinned runtime changes or when Chromium answers the request to keep a debugged tab's priority. ci-kit.yml's parity-browser comment says the same in brief. Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
Closes #606.
Diagnosis
The hosted gates launched the image's preinstalled Chrome for Testing, so a runner image release changed the browser under test without any change to the repository.
macos26 20261123.0526.1changed Chrome for Testing from 157.0.8103.78 to 158.0.8127.36. Nothing else in that release's changelog is something a browser cell uses.Runtime.evaluate,Page.createIsolatedWorld,Input.dispatchMouseEvent). The cells around it run at normal speed. Setup steps and the docs-profiles suite took as long as in green runs. The api suite ran 300 to 550 s on failing hosts against 120 to 290 s on green ones, and the extra time is the stalls.src/browser-service/budgets.mjsandbackend.mjs) were the same on both images.PARITY_CHROME_FLAGS=anti-throttlingset passed 2 of 2, in 116 to 135 s per api suite. This suggests Chrome 158 deprioritises a hidden tab's renderer on macOS more than 157 did. Two runs make this a pointer, not a proof.Change
scripts/repl-parity/hosted/hosted.shno longer launches the image's Chrome. It places the build pinned inscripts/repl-parity/hosted/chrome-for-testing.json(157.0.8103.78) through the native matrix's existing placement, which checks the archive's size and SHA-256, and logs that version beside the image's. Both hosted gates (parity-browser and sandbox-denials) use it.chrome-for-testing.mjsgains--pin <file>on its command line.paths.test/repl-parity/hosted.test.mjsholds the pin valid and the script on it.Why this and not the alternatives
hosted.sh's header rules out.With the pin, the gate compares the two hosts on a fixed Chrome again, and an undeclared difference still fails. A newer Chrome comes in as a pin change, run through the gate like any other change.
Verification
parity-browser at ddae8d9, each run once, no reruns: see the comment below for the run count. Every run's log shows
Chrome for Testing 157.0.8103.78 (pinned 157.0.8103.78); the image's: 158.0.8127.36.Follow-up (not in this PR)
Chrome 158's stalls are likely to reach people's own Chrome too, on both hosts, wherever an agent drives a tab opened inactive. That is a product question for a separate ticket. The pin also has to be moved on purpose, not left behind.
Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)