Skip to content

chore: update managed browser for session security fixes - #5273

Merged
thymikee merged 5 commits into
fix/daybreak-daemon-boundariesfrom
fix/daybreak-remote-web-proxy-session
Dec 1, 2026
Merged

thymikee merged 5 commits into
fix/daybreak-daemon-boundariesfrom
fix/daybreak-remote-web-proxy-session

Conversation

@thymikee

@thymikee thymikee commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Update the managed agent-browser pin from 0.39.0 to 0.42.0 and preserve literal double-dash text in ref-targeted fill by placing the backend separator before caller text. Update provider and integration assertions for that batch shape. This PR is stacked on #5243; remote web admission remains closed.

Before / after

  • Before: filling a ref with literal -- sent one separator token, which the 0.42.0 parser treated as an empty value.
  • After: the backend batch entry includes its separator followed by the literal -- value.

Validation

At e8748aee28, required CI checks pass and GitHub reports no merge conflict. pnpm build passed. An isolated real managed-browser smoke passed. In a separate isolated browser session, built CLI open, snapshot, fill @e1 --platform web --session <id> --json -- --, and a fresh snapshot ran across separate CLI processes; the fill returned success with text -- and the fresh textbox value was --. The session and daemon were closed afterward. No host-boundary confinement proof is claimed; that belongs to #5272.

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.76 MB 6.76 MB +5 B
Package (unpacked) 6.75 MB 6.75 MB +5 B
Package (download) 2.06 MB 2.06 MB -6 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 39.6 ms 30.6 ms -9.0 ms
CLI --help 64.6 ms 63.6 ms -1.0 ms

@thymikee

Copy link
Copy Markdown
Member Author

At 0a73500, the update has one likely regression: fill @eN "--" on web can clear the field and still report success with text --.

fillRef sends the batch entry ["fill", ref, text]. In v0.42.0, the CLI parser (cli/src/commands.rs:512) treats a text argument of -- as a separator, so the value becomes empty. v0.39.0 typed --. This affects a ref-targeted fill without --settle, --verify or a replay guard. The coordinate fill and type paths use keyboard type, whose parser is unchanged. Every ref fill must pass literal text so that the parser cannot read it as syntax. Please send ["fill", browserRefSelector(ref), "--", text], which keeps the selector at command[1], and add a provider test that asserts the batch stdin for text --.

Not blocking: these can be taken or left: map the new outcome_unknown answer (and check page_wedged) to a typed failure that asks to check the page before a retry, including the batch entry path, because it can now surface as a refused text entry or an unknown error code with a setup hint; decide whether managed launches should set AGENT_BROWSER_NO_VERSION_CHECK to 1 by default, since the new version check fetches chromereleases.googleblog.com and the provider drops its warning; give page-state failures such as a ref click on a hidden or disabled element a "run snapshot -i again" hint instead of web setup; and re-check the test comments that cite 0.39 (also in agent-browser-snapshot-refless.test.ts and agent-browser-provider-rects.test.ts) on 0.42.0, or word them as captured on 0.39.0 without calling it the pinned version.

Integration Tests pass, including the live web smoke that exercises the changed pin. Repo Guards & Compatibility fails only on the unused production export admitPublicDestinationAddress in public-network-addresses.ts. That file comes from the base stack and this diff does not touch it, so the failure is likely unrelated. Two Body rules runs were cancelled and a later one passed. One other check is queued.

Not verified here: the 0.42.0 binary was not run, and the upstream behavior was read from source at tags v0.39.0 and v0.42.0, assumed to match the published binaries. Only the commands the provider sends were compared. The live smoke does not clearly cover ref-targeted click, fill or hover, record start and stop, hover, scroll, audio probe or full-page screenshot. Daemon restarts with an existing browser session, and macOS and Windows launches, were not exercised. Focused tests were not re-run locally.

Before merge, the literal -- ref fill needs the fix, and the export failure from the base stack must also clear.

@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

Fixed the blocking ref-fill regression at 8885b4480c. The provider now sends ['fill', ref, '--', text] through batch stdin. A focused provider test asserts the exact stdin for literal -- and checks that caller text stays out of argv (1/1 passed). The PR body records the new head and pending CI.

I left the nonblocking suggestions for separate review: typed outcome_unknown/page_wedged handling and page-state hints change error behavior, while disabling the managed version check changes launch policy. The 0.39.0 comments describe captured fixtures; I have not represented them as 0.42.0 evidence. The actual 0.42.0 binary was not run locally.

@thymikee
thymikee force-pushed the fix/daybreak-remote-web-proxy-session branch from 8885b44 to d897256 Compare November 30, 2026 16:57
@blacksmith-sh

This comment has been minimized.

@thymikee
thymikee force-pushed the fix/daybreak-remote-web-proxy-session branch from d897256 to 12e7de0 Compare November 30, 2026 17:12
@apex-sentinel-staging

This comment has been minimized.

@apex-sentinel-staging apex-sentinel-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apex Sentinel: 2 new findings on 12e7de0. The verdict and the full list are in the summary comment.

@thymikee

Copy link
Copy Markdown
Member Author

At 12e7de0, the literal -- ref fill problem from the earlier review is fixed in production code and has a provider test. Two stale tests and one type error remain, so Coverage and Typecheck are red.

agent-browser-provider.test.ts still expects ['fill', '@e2', 'Grace'], but fillRef now sends ['fill', '@e2', '--', 'Grace']. This unit test passes on the base and fails here, which turns Coverage red. No production behavior defect follows from it. Every assertion on a ref fill entry must expect the separator before the text.

The fake backend in web-provider.test.ts reads the typed value from entry[2], which is now --. So values['@e2'] becomes --, the value assertion fails, and the calls assertion still expects the old entry. The routed ref-fill scenario therefore fails in Coverage. Any fake or assertion that reads a ref fill entry must treat entry[2] as the separator and entry[3] as the text, and should assert that entry[2] === '--'.

agent-browser-provider-text-entry.test.ts passes string | Buffer to JSON.parse. This fails Typecheck with TS2345, and the CLI build and package verification steps are skipped. The argument must be a string, for example JSON.parse(String(options.stdin)).

The open inline threads on the stale fill assertion and the two failing tests still apply. On the side question in the second thread, the upstream v0.42.0 source (commands.rs, line 512) strips the separator in batch entries.

The Typecheck and Coverage failures come from this change. The Repo Guards failure reports the unused export startPublicNetworkProxy in packages/platform-web/src/index.ts, which this PR does not touch. The base also fails that job for an unused export in the same file, so it looks unrelated, but it must be cleared in #5272. Integration Tests pass.

Before merge, the three fixes above need green Typecheck and Coverage on a new head. A ref fill of the text -- through batch stdin must also run on the actual agent-browser 0.42.0 binary, with output showing that the field value reads back as --.

Not verified here: the 0.42.0 binary was not run, and parser behavior was read from the upstream source at tag v0.42.0, assumed to match the published package. Tests were not re-run locally, and test results come from CI logs. The upstream session and security persistence fixes were not verified. The PR author states that live launch, session reuse and host network boundaries are also unverified.

@apex-sentinel-staging

This comment has been minimized.

@apex-sentinel-staging

This comment has been minimized.

@thymikee
thymikee force-pushed the fix/daybreak-remote-web-proxy-session branch from b7db9fa to 925e6f0 Compare November 30, 2026 19:13
@thymikee
thymikee changed the base branch from fix/daybreak-remote-web-proxy to fix/daybreak-remote-web-address-policy November 30, 2026 19:14
@thymikee
thymikee force-pushed the fix/daybreak-remote-web-proxy-session branch from 925e6f0 to 3cff162 Compare November 30, 2026 19:21
@thymikee
thymikee marked this pull request as ready for review November 30, 2026 19:25

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 7 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@blacksmith-sh

This comment has been minimized.

@apex-sentinel-staging

This comment has been minimized.

@apex-sentinel-staging apex-sentinel-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apex Sentinel: 1 new finding on 3cff162. The verdict and the full list are in the summary comment.

@thymikee
thymikee force-pushed the fix/daybreak-remote-web-address-policy branch from 9b9e073 to e25089d Compare November 30, 2026 19:41
@thymikee
thymikee force-pushed the fix/daybreak-remote-web-proxy-session branch from 3cff162 to 479ed20 Compare November 30, 2026 19:42
@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

The code and CI problems from the earlier review are fixed at 479ed20. One piece of live evidence is still missing and is required before merge.

The change moves the managed backend to 0.42.0 and changes the ref fill batch arguments. So far this device-facing web path is proven only by a fake backend and source reading, and the PR body says the real binary run remains unverified. On the managed 0.42.0 binary, please open a page with a text field, take a ref with snapshot, and use agent-device to fill that ref with the literal text --, so the text goes through batch stdin. The output should show the field value reading back as --.

Three earlier threads no longer apply and can be resolved: the first is fixed because the provider test now expects the separator entry; the second is fixed because the fake backend now checks for the separator and reads the text after it; the third needs no change because upstream 0.42.0 keyboard type joins its remaining arguments as literal text, so no separator is needed there.

All checks that ran now pass.

Not verified here: the 0.42.0 binary was not run. Parser behavior was read from the upstream source at tag v0.42.0, which is assumed to match the published package. No tests were re-run outside CI, and the upstream session and security persistence fixes were not checked.

@thymikee

thymikee commented Dec 1, 2026

Copy link
Copy Markdown
Member Author

The pin, ref-fill separator and updated fixtures can merge after one real-binary smoke. On managed 0.42.0, open a local page with a prefilled text field, take a snapshot, fill its ref with literal -- through agent-device and read back the field in the same session. Report the backend version and the observed value. That distinguishes a successful fill from the previous false success that cleared the field. Remote tenant confinement and a cross-platform browser matrix are outside this PR.

Base automatically changed from fix/daybreak-remote-web-address-policy to fix/daybreak-daemon-boundaries December 1, 2026 08:15
@thymikee
thymikee force-pushed the fix/daybreak-daemon-boundaries branch from e16c912 to 1eaaf17 Compare December 1, 2026 09:10
@thymikee
thymikee force-pushed the fix/daybreak-remote-web-proxy-session branch from 479ed20 to d0aa4c7 Compare December 1, 2026 09:27
@thymikee
thymikee force-pushed the fix/daybreak-daemon-boundaries branch from 1eaaf17 to ac87811 Compare December 1, 2026 09:40
@thymikee
thymikee force-pushed the fix/daybreak-remote-web-proxy-session branch from d0aa4c7 to e8748ae Compare December 1, 2026 09:44
@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of e8748ae

Since the review of 479ed20: 0 new · 0 still open · 0 no longer raised

No open findings.

Reviewed with this repository's own Sentinel configuration (7e6ac6eb7a45).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

thymikee commented Dec 1, 2026

Copy link
Copy Markdown
Member Author

At e8748ae, one item from the earlier review remains: there is no real-binary proof that managed browser 0.42.0 fills a literal -- through a ref. The updated test expectations now match the new argv.

The ref fill argv still has no posted smoke run, and the PR body still says ref-fill execution is unverified. The live web smoke uses only selector and coordinate fills, so it does not reach this path. A fake backend cannot tell a real fill of -- from a false success that clears the field on 0.42.0.

Before merge, please run this once on managed 0.42.0. Open a local page with a prefilled text field, run snapshot -i, then run agent-device fill @eN --platform web --session <s> -- --. The first -- ends CLI flag parsing, so a single -- never reaches fill as text. Do not pass --settle or --verify, because they skip the ref route (interactions.ts lines 97-100). Read the field back with a snapshot in the same session. Post the backend version and the observed value, which must be --.

No open review thread still applies, so these can be resolved: this one is fixed because the unit test now expects the separator and Coverage passes. This one is fixed because the web provider scenario now checks the separator and the 4-token entry. This one needs no change: reading the upstream 0.42.0 source showed that keyboard type would type a separator literally, though this was not confirmed with a binary run.

CI is green: every executed check passes, including Coverage, Integration Tests and the live web smoke.

Not verified here: the 0.42.0 binary was not run, its parser source was not re-read in this follow-up, and the suggested command was derived from the CLI parser source but not executed. The upstream session and security persistence fixes were not checked. No tests were re-run locally. The smoke's backend version is inferred from the pinned version and a fresh web setup, since the CI log does not print it.

@thymikee

thymikee commented Dec 1, 2026

Copy link
Copy Markdown
Member Author

The real-binary readback requested in review is recorded in Validation for e8748aee28. With managed 0.42.0, separate built CLI calls opened a page, took a snapshot, filled the ref with literal -- via batch stdin, and took a fresh snapshot. The fresh textbox value was --. The provider and integration fixtures also check the full ref-fill entry. GitHub reports zero unresolved threads.

@thymikee

thymikee commented Dec 1, 2026

Copy link
Copy Markdown
Member Author

At e8748ae, the posted smoke covers what the review asked: on managed 0.42.0, fill @e1 --platform web --session <id> --json -- -- ran through the ref route without --settle or --verify, and a fresh snapshot read back -- in the same session. The evidence item is closed, and no code change is requested.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Dec 1, 2026
@thymikee
thymikee merged commit 206b6a4 into fix/daybreak-daemon-boundaries Dec 1, 2026
19 of 21 checks passed
@thymikee
thymikee deleted the fix/daybreak-remote-web-proxy-session branch December 1, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant