Skip to content

fix(backup): exclude root browser-automation runtime - #95143

Open
talk2themike wants to merge 2 commits into
NousResearch:mainfrom
talk2themike:fisk/backup-browser-automation-exclusion
Open

talk2themike wants to merge 2 commits into
NousResearch:mainfrom
talk2themike:fisk/backup-browser-automation-exclusion

Conversation

@talk2themike

Copy link
Copy Markdown

Summary

  • exclude the root HERMES_HOME/browser-automation runtime from full backups;
  • preserve nested user content whose directory happens to be named browser-automation;
  • use one shared root-only exclusion set in both path classification and os.walk pruning.

Problem

The Browser Use harness stores downloaded Chrome binaries and its live Chromium profile under HERMES_HOME/browser-automation. Full hermes backup currently descends into that regeneratable runtime because the existing browser-profiles exclusion does not cover this path.

The runtime is large and contains live Chromium SQLite/cache files. Walking and snapshotting it can make full backups extremely slow or hang on locked databases. It should be regenerated rather than restored.

The exclusion must be root-only: user-authored nested content such as skills/example/browser-automation/README.md still belongs in the backup.

Verification

  • RED before implementation: root path classification failed while the ZIP-membership fixture exposed the path distinction.
  • Focused regression: 2/2 passed.
  • Full tests/hermes_cli/test_backup.py: 58/58 passed.
  • git diff --check: passed.
  • Independent pre-commit review: PASS; no security or logic findings.

Scope

Two files only:

  • hermes_cli/backup.py
  • tests/hermes_cli/test_backup.py

No provider, network, credential, telemetry, browser runtime or unrelated backup behaviour changes.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard tool/browser Browser automation (CDP, Playwright) labels Aug 26, 2026

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

The automatic full-zip backup path in hermes_cli/backup.py:1965 still prunes every directory named browser-automation, so nested user content such as skills/example/browser-automation/README.md is omitted from create_pre_update_backup() and create_pre_migration_backup(). Please share the root-only directory-pruning logic between the manual and automatic backup walkers, and add a regression test covering nested browser-automation content in the automatic full-zip path.

@talk2themike
talk2themike force-pushed the fisk/backup-browser-automation-exclusion branch from 6926aa3 to e3dd54d Compare August 26, 2026 15:55
@talk2themike

Copy link
Copy Markdown
Author

Thanks — fixed in e3dd54d08a and rebased onto current main.

  • Added shared _prune_excluded_dirs() root-aware pruning used by both manual run_backup() and automatic _write_full_zip_backup().
  • Root HERMES_HOME/browser-automation remains excluded.
  • Nested user content such as skills/example/browser-automation/README.md is retained.
  • Added a parameterized public-path regression covering both create_pre_update_backup() and create_pre_migration_backup().
  • Full tests/hermes_cli/test_backup.py: 61 passed; git diff --check passes.

The PR remains scoped to hermes_cli/backup.py and tests/hermes_cli/test_backup.py.

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

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists tool/browser Browser automation (CDP, Playwright) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants