fix: distinguish "no release yet" from "could not reach github" in --doctor#154
Open
iskyiskyisky wants to merge 1 commit intobrowser-use:mainfrom
Open
fix: distinguish "no release yet" from "could not reach github" in --doctor#154iskyiskyisky wants to merge 1 commit intobrowser-use:mainfrom
iskyiskyisky wants to merge 1 commit intobrowser-use:mainfrom
Conversation
…doctor `browser-harness --doctor` currently prints "(could not reach github)" whenever `/repos/.../releases/latest` does not return a tag -- including the common case where the repo has no releases published yet, which returns an HTTP 404. The message implies a network problem when the API is reachable and simply has nothing to report. Split the two cases in `_latest_release_tag`: return a (tag, reachable) pair so callers can tell them apart. Doctor now prints "(no release published yet)" when reachable, "(could not reach github)" only on actual HTTP/network failure. 404 results are cached alongside successful ones so repeated doctor runs don't re-hit the API. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="admin.py">
<violation number="1" location="admin.py:388">
P2: `check_for_update` drops the new `reachable` signal, so `run_update` misreports "could not reach github" when GitHub is reachable but has no releases.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
| and no cache exists, or if no release has been published yet.""" | ||
| cur = _version() | ||
| latest = _latest_release_tag() | ||
| latest, _ = _latest_release_tag() |
Contributor
There was a problem hiding this comment.
P2: check_for_update drops the new reachable signal, so run_update misreports "could not reach github" when GitHub is reachable but has no releases.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At admin.py, line 388:
<comment>`check_for_update` drops the new `reachable` signal, so `run_update` misreports "could not reach github" when GitHub is reachable but has no releases.</comment>
<file context>
@@ -371,9 +382,10 @@ def _version_tuple(v):
+ and no cache exists, or if no release has been published yet."""
cur = _version()
- latest = _latest_release_tag()
+ latest, _ = _latest_release_tag()
newer = bool(cur and latest and _version_tuple(latest) > _version_tuple(cur))
return cur, latest, newer
</file context>
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
browser-harness --doctorprints(could not reach github)wheneverGET /repos/.../releases/latestdoesn't return a tag — including the common case where the repo has no releases yet (HTTP 404). The wording implies a network problem when the API is reachable and simply has nothing to report. Right now the repo has no releases published, so every doctor invocation shows the misleading message._latest_release_tagby returning a(tag, reachable)pair. Doctor prints(no release published yet)when reachable,(could not reach github)only on genuine HTTP/network failure.--doctorcalls don't re-hit the API within the 24h TTL.Test plan
rm /tmp/bu-version-cache.json && browser-harness --doctor— shows(no release published yet)against current repo state(could not reach github)(unchanged path)🤖 Generated with Claude Code
Summary by cubic
Fixes misleading “(could not reach github)” in
browser-harness --doctorwhen a repo has no releases. Now shows “(no release published yet)” and caches 404s to avoid repeat API calls._latest_release_tagnow returns(tag, reachable)to distinguish no-release from network errors.--doctorprints the correct status: shows the latest tag, “(no release published yet)”, or “(could not reach github)” on actual failure.Written for commit 2184fec. Summary will update on new commits.