Skip to content

feat: add gitt doctor command for one-shot environment health check - #937

Closed
Tet-9 wants to merge 3 commits into
entrius:testfrom
Tet-9:feat/740-gitt-doctor-command
Closed

feat: add gitt doctor command for one-shot environment health check#937
Tet-9 wants to merge 3 commits into
entrius:testfrom
Tet-9:feat/740-gitt-doctor-command

Conversation

@Tet-9

@Tet-9 Tet-9 commented May 2, 2026

Copy link
Copy Markdown
Contributor

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 of data/miner_pats.json
to figure out which layer is broken.

Solution

Added gitt doctor — a single command that runs a sequential health
check 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

  1. Wallet — coldkey file readable, hotkey SS58 loaded
  2. Subtensor — endpoint reachable, current block, hotkey registered on netuid
  3. GitHub PAT/user call succeeds, login and rate-limit displayed
  4. Contract — contract client connects, issue count returned
  5. Local stateminer_pats.json parseable if present

Options

--wallet, --hotkey, --netuid, --network, --rpc-url, --pat
— same standard flags as other miner commands.

Changes

  • gittensor/cli/doctor.py — new command implementation
  • gittensor/cli/main.py — registered doctor with root CLI group

@xiao-xiao-mao xiao-xiao-mao Bot added the feature Net-new functionality label May 2, 2026
@Tet-9

Tet-9 commented May 2, 2026

Copy link
Copy Markdown
Contributor Author

@anderdc , it's on for review 🫡

@anderdc

anderdc commented May 5, 2026

Copy link
Copy Markdown
Collaborator

Issue #740 was closed as not planned because I didn't believe it was needed, closing

@anderdc anderdc closed this May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Net-new functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggest a new feature or improvement

2 participants