Skip to content

fix(doctor): compare HEAD against origin/main when no Releases exist#386

Open
swhitt wants to merge 1 commit into
browser-use:mainfrom
swhitt:sha-update-check
Open

fix(doctor): compare HEAD against origin/main when no Releases exist#386
swhitt wants to merge 1 commit into
browser-use:mainfrom
swhitt:sha-update-check

Conversation

@swhitt
Copy link
Copy Markdown

@swhitt swhitt commented May 22, 2026

Summary

Doctor reports latest release (could not reach github) even on a healthy network, because releases/latest 404s on this repo (no Releases cut). The daily update banner is silent for the same reason.

This repo ships via merges to main, so for editable git installs I switched the check over to GET /commits/main and compare against local HEAD. Pypi installs keep the existing release-tag path, so nothing changes if you start cutting Releases later.

Doctor output for an editable clone now reads:

  • version: 0.1.0 (git)
  • origin/main: 6d20866664ea (up to date)

Small drive-by: _repo_dir was checking (p / ".git").is_dir(), which misses linked worktrees (gitlink file). Swapped to .exists() so worktree-based reviews exercise the git path too.

Test plan

  • uv run pytest (117 passing, 6 new)
  • Ran the patched run_doctor() against an editable clone, shows the
    new origin/main line

Summary by cubic

Fixes Doctor update checks for repos without Releases by comparing local HEAD to origin/main for editable git installs. Restores the daily update banner; PyPI installs still use release tags.

  • Bug Fixes
    • Doctor fetches commits/main, caches the short SHA for 24h, and shows an origin/main line with “up to date” or “update available”.
    • Falls back to release-tag checks for PyPI installs or when git probing fails.
    • _repo_dir now recognizes linked worktrees by checking .git existence, not only directories.
    • Added unit tests for SHA comparison paths, output, and worktree detection.

Written for commit 12c1a42. Summary will update on new commits. Review in cubic

Doctor and the daily banner went through releases/latest, which 404s on
this repo since it doesn't cut GitHub Releases. The doctor reported
"latest release    (could not reach github)" even on a healthy network,
and the banner was silent as a side effect.

For editable git installs, compare local HEAD against origin/main via
/commits/main. Pypi installs keep the release-tag path. Also recognize
linked worktrees in _repo_dir so editable installs under a worktree
still detect as git.
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

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