Skip to content

Increase brew outdated timeout from 15s to 60s#695

Open
groksrc wants to merge 1 commit intomainfrom
fix/increase-brew-outdated-timeout
Open

Increase brew outdated timeout from 15s to 60s#695
groksrc wants to merge 1 commit intomainfrom
fix/increase-brew-outdated-timeout

Conversation

@groksrc
Copy link
Copy Markdown
Member

@groksrc groksrc commented Mar 26, 2026

Summary

  • Increases BREW_OUTDATED_TIMEOUT_SECONDS from 15s to 60s in src/basic_memory/cli/auto_update.py
  • Homebrew can be slow depending on network conditions or index updates, causing intermittent timeouts
  • This is a non-interactive background check, so a longer timeout won't impact UX

Fixes #694

Test plan

  • Verify brew outdated check still works normally
  • Confirm no test regressions (just fast-check)

🤖 Generated with Claude Code

Homebrew can be slow depending on network conditions or if it needs to
update its index, causing the update check to time out intermittently.
Since this is a non-interactive background check, a longer timeout won't
impact UX.

Fixes #694

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Drew Cain <groksrc@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2026

Claude finished @groksrc's task in 45s —— View job


PR Review: Increase brew outdated timeout from 15s to 60s

  • Gather context and read changed files
  • Review against team checklist
  • Post final review

This is a minimal, well-reasoned fix. Here's the full checklist review:

Code Quality & Standards

  • Follows Basic Memory coding conventions — simple constant change, no structural impact
  • Python 3.12+ type annotations — not applicable (constant definition)
  • SQLAlchemy 2.0 / FastAPI / Typer conventions — not applicable
  • 100-character line length maintained
  • No commented-out code

Testing & Documentation

  • No new functions or methods — no new unit tests required
  • 100% test coverage maintained — the constant feeds directly into _run_subprocess via timeout_seconds; existing tests mock subprocess calls and aren't sensitive to the constant value
  • No documentation updates needed for a timeout constant change

Basic Memory Architecture

  • No MCP tool changes
  • No database/migration changes
  • Preserves local-first architecture
  • No knowledge graph impact

Security & Performance

  • No secrets or credentials
  • No new input validation surface
  • Error handling unchanged (TimeoutError is already caught in run_auto_update)
  • The longer timeout is appropriate: this is a background, non-interactive check

Compatibility

  • No file path comparisons
  • No emoji/unicode in console or log output

Summary

Approved. The change is correct and safe.

The 60s value is proportionate relative to the other timeouts in the same file (UV_UPGRADE_TIMEOUT_SECONDS = 180, BREW_UPGRADE_TIMEOUT_SECONDS = 600). The brew outdated check runs in the background during interactive CLI sessions only (maybe_run_periodic_auto_update returns early for non-interactive contexts), so a slower network won't block users.

One minor observation: the constant BREW_OUTDATED_TIMEOUT_SECONDS is only referenced in _check_homebrew_update_available (line 133) and nowhere else in the codebase — no other files need updating.

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.

Increase BREW_OUTDATED_TIMEOUT_SECONDS from 15s to 60s

1 participant