Skip to content

feat: allow disabling update checks - #634

Open
MagMueller wants to merge 1 commit into
mainfrom
agent/disable-update-check
Open

feat: allow disabling update checks#634
MagMueller wants to merge 1 commit into
mainfrom
agent/disable-update-check

Conversation

@MagMueller

@MagMueller MagMueller commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add BH_UPDATE_CHECK=0 to disable the CLI update banner before cache or network access
  • preserve existing standalone behavior when the variable is unset
  • cover accepted false values and the default-enabled path

Why

Long-lived orchestrators can run Browser Harness in isolated runtime directories. Their lifecycle probes and cleanup commands should not make an unrelated PyPI request or wait on its timeout. This gives trusted callers a narrow opt-out without changing normal CLI behavior.

Validation

  • uv run --with pytest pytest -q (145 passed)
  • python3 -m compileall -q src tests
  • git diff --check

This is intentionally separate from #626 and is not merged.

Summary by cubic

Allow disabling update banner update checks via the BH_UPDATE_CHECK environment variable to avoid network/cache access in CI or hermetic environments. Previously, print_update_banner always read cache and could trigger a network call; now it can be skipped.

  • When BH_UPDATE_CHECK is set to 0/false/no/off (case-insensitive, trims whitespace), print_update_banner returns immediately without reading the cache or calling check_for_update.
  • Default remains enabled; behavior is unchanged when the variable is unset.
  • Tests cover disabled behavior (no cache/network) and default behavior (still performs the check).
  • To disable in CI: set BH_UPDATE_CHECK=0.

Written for commit 37849b8. Summary will update on new commits.

Review in 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.

No issues found across 2 files

Re-trigger cubic

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.

1 participant