Repository navigation
feat(computer): gate 3 checks a browser computer's input and page tools on an HTML Fixture Desk - #475
Merged
Merged
Conversation
…ls on an HTML Fixture Desk On a driver whose screen is a page, the probe stages an HTML desk with the Tk desk's widgets, serves it on loopback, opens it in a tab of its own and runs P3-P7, P9 and the full X checks on it, then checks the page tools against it. The page driver sends one wheel event per notch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es every tab it opened Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Target.createTarget with a URL starts loading before the tab is attached and held to the window, so its page loaded at 1280x713 and then resized. Headless, the tab now opens blank and navigates once held. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A hidden tab whose page had input still says document.hasFocus(), so after an agent typed in one tab and opened another, the hidden first tab stayed the active one and got its input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What and why
Gate 3 now checks a browser computer's input and its page tools the way it checks a desktop's input. Before this, a browser computer's build was marked ready with six input checks unverified (P3–P7 and P9), because the probe's Fixture Desk is a Tk window and a browser computer has no display. So a page driver whose clicks landed off target, or whose typing dropped characters, still passed gate 3.
This is PR 3 of 3 for the browser as a computer, part of FD-5116. Its five decisions are in the design note, under "PR 3, the probe on a page".
The HTML Fixture Desk (
conformance/page_fixture.py). It's a web page with the Tk desk's widgets at the same places:Its script sends what it records to a small server on loopback. That server writes the same
layout.jsonandstate.jsonthe Tk desk writes and readsinbox.txtback to the page. So P3–P7 and P9 are unchanged; only the desk changes. The page adds an Ask button that opens aprompt()and a file input, for the page-tool checks.The probe picks the desk by the card's
screen(decision 1):screen: "page", it stages the server withdata/add, starts it withcomputer-execand opens the desk withcomputer_tabsin a tab of its own.fullX checks: pointer input,data/addand recording.computer-page/v1leaves thefullchecks unverified and says why.The page tools are checked too, as X checks under
computer-page/v1, each confirmed on the desk or in the page a new frame names (decision 3):pageshows. A click meanwhile is refuseddialog_open, andcomputer_dialog's text reaches the page. When the browser answers dialogs itself, this check is not applicable and says so.~/Uploads, and a click on the file input opens a chooser shown inpage. A path outside~/Uploadsis refused, andcomputer_uploaddelivers the file's name and content to the page.page.pagefollow the active tab.The clipboard check on a page (decision 2). "Typing leaves the clipboard as it was" fails when typing arrives as a paste. The desk watches its fields for paste events, which checks the risk itself without needing headless Chrome's clipboard or a permission the probe can't grant.
What the probe leaves (decision 4). It closes its own tab, then removes the desk and its file in
~/Uploads. The tab that was open before keeps its page and history.The page driver sends one wheel event per notch (decision 5), in one
page/inputcall, as a real mouse wheel does in Chrome. Before, a scroll of 3 was one 300 px event, so pages that count wheel events, and P7, saw 1.Two fixes to the browser's control, found by the desk on the VMs:
Target.createTargetwith a URL starts loading before the tab is attached and held to the window, so a page opened withcomputer_tabsran its scripts at 1280×713 and then resized to 1280×800. Headless, the tab now opens blank and navigates once it's held.document.hasFocus(). So after an agent typed in one tab and opened another, the hidden first tab stayed the active one, and screenshots and input went to it.Size: 732 lines added, about 270 of them tests, and the fake page driver.
How it was tested
ruff check: clean.The desk in a real browser: a local headless Chrome, driven over CDP with the page driver's events:
Protocol tests: 1021 passed. The new ones, against a fake page driver:
And in the browser's control: a tab it opens loads its page once held to the window, and a hidden tab that still says it has focus isn't the active one.
Unit tests: 11,793 passed. The page driver's new test checks a scroll is one wheel event per notch, sent together.
test_a_token_signs_the_clonewas left out, because it waits ongit credential fillon this laptop, on main too.Integration, slow tier, on agent-environments-admin VMs (amd64 c6i.2xlarge, arm64 c7g.2xlarge): 13 passed on each, at 1a94a58. That's
browser_computer_test.py(4),chromium_app_test.py(7) andwebsite_browser_test.py(2).computer-page/v1verified. Its probe: 60 passed, 0 failed, 0 unverified, and P8 not applicable.Greptile: 4/5 on the first commit, with two findings, both fixed in 223f13a with tests:
fixture.py, which the page desk doesn't stage, so it would have failed every browser computer;Then 5/5 on 223f13a and on 1a94a58.
🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no new blocking issue was found.Summary
Adds an HTML Fixture Desk so gate 3 can check browser input and page tools.
No new actionable issues were found. Tests were inspected, not run.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR Probe[Full probe] --> Screen{Screen kind} Screen -->|Desktop| Tk[Tk Fixture Desk] Screen -->|Page| Server[Loopback fixture server] Server --> Tab[Probe-owned browser tab] Tk --> Input[Input checks] Tab --> Input Tab --> Tools[Page-tool checks] Tools --> Cleanup[Close probe tabs and remove fixture files]Reviews (4) · Last reviewed commit: "fix(computer): the active tab is the vis..." · Reviewed by Greptile