← Back to PRs

#7589: Tests: accept browser profiles auth option

by justinhuangcode open 2026-02-03 00:44 View on GitHub →
agents
## Summary - update browser tool test to accept the new authToken option passed to browserProfiles ## Testing - pnpm vitest run --config vitest.unit.config.ts src/agents/tools/browser-tool.test.ts ## Notes - fixes the failing test in #7518 after browser auth changes AI-assisted: Yes (Codex). Prompts/session logs available on request. <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates the browser tool and browser client plumbing to support an `authToken` option when calling into the browser control service (including bridge-server auth enforcement), and adjusts the browser tool unit test to accept the new `browserProfiles(baseUrl, { authToken })` call shape. Change fits the existing architecture by threading authentication through the same `fetchBrowserJson` path used for other browser calls, while allowing sandbox bridge URLs to require a bearer token. <h3>Confidence Score: 4/5</h3> - This PR looks safe to merge with low functional risk. - The changes primarily thread an auth token through existing browser client APIs and update tests accordingly; the main concern is that the updated test assertion is permissive and may not catch unintended option forwarding. - src/agents/tools/browser-tool.test.ts <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs