feat: add gitt doctor command for one-shot environment health check - #937
Closed
Tet-9 wants to merge 3 commits into
Closed
feat: add gitt doctor command for one-shot environment health check#937Tet-9 wants to merge 3 commits into
Tet-9 wants to merge 3 commits into
Conversation
Contributor
Author
|
@anderdc , it's on for review 🫡 |
…in doctor command
…Status.ACTIVE to get_issues_by_status
Collaborator
|
Issue #740 was closed as not planned because I didn't believe it was needed, closing |
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.
Fixes #740
Problem
When a miner fails to score, an operator must trial-and-error through
several commands (
gitt miner check,gitt miner post,gitt issues view) plus manual inspection ofdata/miner_pats.jsonto figure out which layer is broken.
Solution
Added
gitt doctor— a single command that runs a sequential healthcheck across all critical layers and prints a pass/fail checklist:
Gittensor Doctor
Wallet
✓ Coldkey readable: ~/.bittensor/wallets/alice/...
✓ Hotkey loaded: 5GxYZ...
Subtensor
✓ Subtensor reachable: wss://entrypoint-finney... (block 4,213,122)
✓ Hotkey registered on netuid 74
GitHub PAT
✓ PAT valid: alice123 (rate limit 4998/5000)
Contract
✓ Contract reachable: 5FWNdk8... (42 issues)
Local State
✓ miner_pats.json readable: 8 entries
All checks passed.
Exits with code 1 if any check fails, making it CI/pipeline friendly.
Checks performed
/usercall succeeds, login and rate-limit displayedminer_pats.jsonparseable if presentOptions
--wallet,--hotkey,--netuid,--network,--rpc-url,--pat— same standard flags as other miner commands.
Changes
gittensor/cli/doctor.py— new command implementationgittensor/cli/main.py— registereddoctorwith root CLI group