Skip to content

test(browser): cover unused browser directory lifecycle - #6243

Open
Aafimalek wants to merge 5 commits into
browser-use:mainfrom
Aafimalek:fix/download-directory-lifecycle
Open

Aafimalek wants to merge 5 commits into
browser-use:mainfrom
Aafimalek:fix/download-directory-lifecycle

Conversation

@Aafimalek

@Aafimalek Aafimalek commented Oct 30, 2026 •

Copy link
Copy Markdown

Why

The 1.0 rewrite removed BrowserProfile and the download watchdog changed by this PR. In 1.0, a never-run agent already avoids creating a temporary workspace. This PR extends that existing regression check to cover constructing local and CDP-attached browser objects without starting them, protecting against the same unused-directory problem reported in #5422.

Related to #5422. This is a test-only update against 1.0; it does not address the separate user-data-directory cleanup from the issue or alter download behavior after startup.

Verification

  • The updated test_an_agent_that_never_runs_leaves_no_temp_workspace passed on Windows. It checks unused agents, local browsers and CDP-attached browsers without launching Chrome.
  • Ruff checks passed. Pyright passed with the Linux target on the same upstream version; the Windows pre-commit Pyright hook reports ten platform-specific errors on a clean upstream checkout and was skipped in the merge commit hook after comparison. Other commit hooks passed.
  • No GPU, hosted service or external browser session was used. The earlier 0.x real-download checks do not establish 1.0 download behavior.

@mintlify

mintlify Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 208dfff.

Approve preview

@CLAassistant

CLAassistant commented Oct 30, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@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.

All reported issues were addressed across 4 files

Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.

View guided diff | Re-trigger cubic

@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.

All reported issues were addressed across 2 files (changes from recent commits).

Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.

View guided diff | Re-trigger cubic

@Aafimalek

Copy link
Copy Markdown
Author

Following up on this fix for download directories being created before they are needed. Is there anything else needed to help review it?

@Aafimalek Aafimalek changed the title fix(browser): defer default download directory creation test(browser): cover unused browser directory lifecycle Nov 10, 2026
@gitguardian

gitguardian Bot commented Nov 18, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
39893883 Triggered Generic Password 208dfff browser_use/telemetry/stats.py View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants