This repository was archived by the owner on May 15, 2026. It is now read-only.
Repository navigation
fix: handle non-semver ToolHive versions and use configurable timeout - #52
Merged
Merged
Conversation
- Update _parse_toolhive_version to gracefully handle development builds that don't follow semver (e.g., 'build-7c3a3077') by returning a default version '0.0.0-dev' instead of raising an error - Replace hardcoded 1.0s timeout with self.timeout in _is_toolhive_available for better configurability
PR Review for #52SummaryGood fixes that improve robustness. The changes handle non-semver versions gracefully and use the correct timeout configuration. Both changes are sensible improvements. Code Quality & Best Practices ✅
Issues & Suggestions 🔍Critical:
Minor:
Performance & Security ✅
Regressions & Breaking Changes ✅
Recommendations
Estimated fix time: 5 minutes |
ptelang
previously approved these changes
Nov 7, 2025
ptelang
left a comment
Contributor
There was a problem hiding this comment.
Good find! Changes look good!
tgrunnagle
previously approved these changes
Nov 7, 2025
Signed-off-by: nigel brown <[email protected]>
ptelang
previously approved these changes
Nov 7, 2025
Signed-off-by: nigel brown <[email protected]>
therealnb
enabled auto-merge (squash)
November 7, 2025 17:18
tgrunnagle
approved these changes
Nov 7, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR fixes two issues in the ToolHive client:
Non-semver version handling: Updates
_parse_toolhive_versionto gracefully handle development builds that don't follow semver (e.g., 'build-7c3a3077') by returning a default version '0.0.0-dev' instead of raising an error. This allows connections to succeed with development builds while still logging the issue.Configurable timeout: Replaces the hardcoded 1.0s timeout with
self.timeoutin_is_toolhive_availablefor better configurability.Changes
src/mcp_optimizer/toolhive/toolhive_client.pyTesting
Note
That code was inserted as part of #19 so we should consider if the patch above is consistent with that.