fix(doctor): compare HEAD against origin/main when no Releases exist#386
Open
swhitt wants to merge 1 commit into
Open
fix(doctor): compare HEAD against origin/main when no Releases exist#386swhitt wants to merge 1 commit into
swhitt wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Doctor reports
latest release (could not reach github)even on a healthy network, becausereleases/latest404s 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 toGET /commits/mainand compare against localHEAD. 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:
0.1.0(git)6d20866664ea(up to date)Small drive-by:
_repo_dirwas 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)run_doctor()against an editable clone, shows thenew
origin/mainlineSummary by cubic
Fixes Doctor update checks for repos without Releases by comparing local HEAD to
origin/mainfor editable git installs. Restores the daily update banner; PyPI installs still use release tags.commits/main, caches the short SHA for 24h, and shows anorigin/mainline with “up to date” or “update available”._repo_dirnow recognizes linked worktrees by checking.gitexistence, not only directories.Written for commit 12c1a42. Summary will update on new commits. Review in cubic