fix(browser): re-check interaction-driven navigations#63226
Conversation
Greptile SummaryThis PR extends the browser SSRF policy guard to cover interaction-driven navigations: clicks, evaluate calls, and batch sequences. It introduces Confidence Score: 5/5Safe to merge — the navigation guard logic is sound, ssrfPolicy threading is complete, and regression tests cover the key paths. All remaining observations are cosmetic P2 (minor style inconsistency in how ssrfPolicy is read inside agent.act.ts). No correctness, security, or data-integrity issues found. No files require special attention.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 188313d006
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 188313d006
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
188313d to
cc9edf7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0a668cf06
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 995a729937
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (actionError) { | ||
| throw actionError; |
There was a problem hiding this comment.
Re-throw falsy interaction errors
assertInteractionNavigationCompletedSafely records failures in actionError, but later branches on truthiness (if (actionError)), so a rejected action with a falsy reason (for example Promise.reject() / throw undefined from evaluate) is treated as success and returned as undefined. This is a behavior regression from the previous direct await path and can silently mark failed act:evaluate calls as successful, which breaks caller error handling and can let later steps run on invalid assumptions.
Useful? React with 👍 / 👎.
* main: (522 commits) fix(browser): re-check interaction-driven navigations (openclaw#63226) test: reuse verbose directive reply imports test: reuse exec directive reply imports fix(browser): harden browser control override loading (openclaw#62663) Matrix: report startup failures as errors auth: persist explicit profile upserts directly test(doctor): mock memory-core runtime seam auth: avoid external cli sync on profile upsert feat: parallelize character eval runs fix: load QA live provider overrides build: stage nostr runtime dependencies fix(dotenv): block workspace runtime env vars (openclaw#62660) build: narrow plugin SDK declaration build test: harden Parallels macOS smoke fallback fix(memory): accept embedded dreaming heartbeat tokens test: harden provider mock isolation docs(config): tighten wording in reference test: reuse followup runner imports test: reuse image generate tool imports Align remote node exec event system messages with untrusted handling (openclaw#62659) ...
* fix(browser): guard interaction-driven navigations * fix(browser): avoid rechecking unchanged interaction urls * fix(browser): guard delayed interaction navigations * fix(browser): guard interaction-driven navigations for full action duration * fix(browser): avoid waiting on interaction grace timer * fix(browser): ignore same-document hash-only URL changes in navigation guard * fix(browser): dedupe interaction nav guards * fix(browser): guard same-URL reloads in interaction navigation listeners * docs(changelog): add interaction navigation guard entry * fix(browser): drop duplicate ssrfPolicy props * fix(browser): tighten interaction navigation guards --------- Co-authored-by: Devin Robison <[email protected]>
* fix(browser): guard interaction-driven navigations * fix(browser): avoid rechecking unchanged interaction urls * fix(browser): guard delayed interaction navigations * fix(browser): guard interaction-driven navigations for full action duration * fix(browser): avoid waiting on interaction grace timer * fix(browser): ignore same-document hash-only URL changes in navigation guard * fix(browser): dedupe interaction nav guards * fix(browser): guard same-URL reloads in interaction navigation listeners * docs(changelog): add interaction navigation guard entry * fix(browser): drop duplicate ssrfPolicy props * fix(browser): tighten interaction navigation guards --------- Co-authored-by: Devin Robison <[email protected]>
* fix(browser): guard interaction-driven navigations * fix(browser): avoid rechecking unchanged interaction urls * fix(browser): guard delayed interaction navigations * fix(browser): guard interaction-driven navigations for full action duration * fix(browser): avoid waiting on interaction grace timer * fix(browser): ignore same-document hash-only URL changes in navigation guard * fix(browser): dedupe interaction nav guards * fix(browser): guard same-URL reloads in interaction navigation listeners * docs(changelog): add interaction navigation guard entry * fix(browser): drop duplicate ssrfPolicy props * fix(browser): tighten interaction navigation guards --------- Co-authored-by: Devin Robison <[email protected]>
* fix(browser): guard interaction-driven navigations * fix(browser): avoid rechecking unchanged interaction urls * fix(browser): guard delayed interaction navigations * fix(browser): guard interaction-driven navigations for full action duration * fix(browser): avoid waiting on interaction grace timer * fix(browser): ignore same-document hash-only URL changes in navigation guard * fix(browser): dedupe interaction nav guards * fix(browser): guard same-URL reloads in interaction navigation listeners * docs(changelog): add interaction navigation guard entry * fix(browser): drop duplicate ssrfPolicy props * fix(browser): tighten interaction navigation guards --------- Co-authored-by: Devin Robison <[email protected]>
* fix(browser): guard interaction-driven navigations * fix(browser): avoid rechecking unchanged interaction urls * fix(browser): guard delayed interaction navigations * fix(browser): guard interaction-driven navigations for full action duration * fix(browser): avoid waiting on interaction grace timer * fix(browser): ignore same-document hash-only URL changes in navigation guard * fix(browser): dedupe interaction nav guards * fix(browser): guard same-URL reloads in interaction navigation listeners * docs(changelog): add interaction navigation guard entry * fix(browser): drop duplicate ssrfPolicy props * fix(browser): tighten interaction navigation guards --------- Co-authored-by: Devin Robison <[email protected]>
Summary
Changes
assertPageNavigationCompletedSafely(...)after Playwrightclickandevaluatecalls so interaction-driven main-frame navigations are quarantined when they land on blocked URLsssrfPolicythroughactroute handling, hook-triggered clicks, and batched browser actions so interaction paths use the same policy as guarded navigation pathsValidation
corepack pnpm test extensions/browser/src/browser/pw-tools-core.interactions.navigation-guard.test.ts extensions/browser/src/browser/pw-tools-core.interactions.evaluate.abort.test.ts extensions/browser/src/browser/pw-tools-core.interactions.batch.test.ts extensions/browser/src/browser/pw-tools-core.clamps-timeoutms-scrollintoview.test.tscorepack pnpm tsgoand observed unrelated pre-existing repo-wide type errors outside the touched browser filesclaude -p "/review", but the tool requested an existing PR context/number before it would proceedNotes
maintsgois currently red on unrelated files, so validation here is scoped to the touched browser interaction surface