Repository navigation
A two-state invoice regression: fresh snapshots, model abstention, and a disabled-click check #2519
FenjuFu
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The invoice is still there, but its status changed. Should a browser agent keep going?
I built a small regression case with agent-browser 0.42.0 and Spark-X2.6-4B: approve INV-104 only when its row says USD 120 and Pending. The page uses synthetic invoices and runs locally in a real headless Chrome session. A refresh changes INV-104 to Paid and puts another pending invoice at the same amount, so matching on price alone is insufficient.
The normal run selected the correct ref and the page displayed
Approved INV-104. After a reload and queue refresh, a fresh snapshot showed Paid and a disabled button; the model returnedabstain, with no approval submitted. A separate direct click on that disabled button failed with exit code 1.What ran
click @e15; executed;Approved INV-104verified in a subsequent snapshotsnapshot -i, one API callclick @e15decision; not executed separatelyabstain; INV-104 was Paid; INV-105 was Pending at USD 120Element '@e42' is disabled, so the click would not reach itThat is five model responses, covering two states of one constructed page, not a task-success benchmark. In this table,
snapshot -iretained the amount and status cells. Inspect the emitted snapshot for your page rather than assuming those values disappear. Full snapshots also made the result text available for the post-action assertion.The full-page capture above repeats the normal click to include the result below the fold. The first model-driven run produced the same result in its saved snapshot.
Reproduce the two-state check
Install the pinned CLI locally with
pnpm add agent-browser@0.42.0. The package includes the native Windows binary. This run used it directly; pnpm skipped the optional postinstall script, which was not needed. Chrome must be installed;agent-browser installis the documented browser installation command if you need it.Save this as
fixture.html:Save this as
reproduce.cjs:Set
AGENT_BROWSER_BINto the absolute path of the installed native binary andSPARK_ENDPOINTto your authorized chat-completions endpoint. Supply its key inSPARK_API_KEYthrough your normal secret mechanism. The hosted model used here isspark-x2.6-4b; do not send private invoice data to an endpoint without the appropriate authorization. Runnode reproduce.cjsfrom the directory containing both files. It writes request/response and browser-command evidence toreproduce-log.json, without writing the authorization header.For a manual disabled-button check, reload the page, take a snapshot, click Refresh queue, then snapshot again and run
agent-browser --session YOUR_SESSION click '@eN'with the disabled button's current ref. Quote refs in PowerShell: an unquoted@e42was interpreted as splatting in my first attempt, producing a missing-argument error before any click. The quoted retry reached the disabled-element check.The executed browser commands were
open,snapshot,click,reload,find role button click --name "Refresh queue", andsnapshotagain. Ref numbers are session-specific; the reproduction extracts the current ref rather than hard-coding the numbers above.Environment and limits
Windows x64, Intel Core Ultra 5 125H, HeadlessChrome 156.0.0.0, agent-browser 0.42.0, source tag SHA
e7519957b9067c541825afa21a792fbe1f483047. Model requests used temperature 0, max_tokens 700, and thinking disabled. The model-card revision was64ca8f2a295b8ceb2757b9d4749a6558c4759e5b, Apache-2.0; the hosted endpoint did not expose an independently verifiable weight revision or quantization. Each request used only the fixed instruction and that state's snapshot.The fixture updates a DOM status message, not an accounting backend. These checks cover action selection, refreshed observation, and the disabled-click boundary. They do not test concurrent changes between observation and action, server-side authorization, duplicate submission prevention, or prompt-injection resistance. A real approval service still needs an atomic server-side state check; a model decision or a browser button cannot supply that guarantee.
All reactions