Skip to content

fix(cli): surface skipped validators in miner post/check error path - #990

Merged
anderdc merged 2 commits into
entrius:testfrom
statxc:fix/validator-axons-error-shows-excluded
May 9, 2026
Merged

fix(cli): surface skipped validators in miner post/check error path#990
anderdc merged 2 commits into
entrius:testfrom
statxc:fix/validator-axons-error-shows-excluded

Conversation

@statxc

@statxc statxc commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

When --min-stake / --min-vtrust exclude every high-vtrust validator, both gitt miner post and gitt miner check printed only the generic No reachable validator axons found on the network. and discarded the excluded list that the success path already exposes.
The fix branches on whether excluded is non-empty and surfaces the same payload — TTY renders the existing Skipped Validators table, JSON includes skipped on the error envelope.
The original generic message is preserved when the metagraph carries no candidates at all (n=0 or every UID below min_vtrust).

Problem

  • gittensor/cli/miner_commands/helpers.py:138 (pre-fix) called _error('No reachable validator axons found on the network.', json_mode) and exited, regardless of why every candidate dropped out.
  • Operators hitting this case are exactly the ones who need the diagnostic (their stake/vtrust thresholds eliminated everyone).
  • cli: filter low-stake validators from PAT broadcast/check #906 introduced --min-stake / --min-vtrust and the excluded list, wired it into the success path, but the error path was missed.

Out of scope

Validation

  • uv run ruff check — clean
  • uv run ruff format --check — clean
  • uv run pyright — 0 errors
  • uv run python -m pytest — 745 passed (+4 new regression tests)

Closes #989

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 5, 2026
When --min-stake / --min-vtrust eliminate every high-vtrust candidate,
_require_validator_axons discarded the `excluded` payload that the success
path already exposes and emitted only the generic "No reachable validator
axons found on the network." message. Operators hitting this case are
exactly the ones who need the diagnostic.

Branch on whether `excluded` is non-empty: TTY renders the existing
Skipped Validators table before the error, JSON includes the `skipped`
array on the error envelope, and the error message names the active
thresholds. The original generic message is preserved when the metagraph
carries no candidates at all (n=0 or every UID below min_vtrust).

entrius#906 introduced the filtering knobs and `excluded` list and wired them
into the success path; the error path was missed in the same change.
@statxc
statxc force-pushed the fix/validator-axons-error-shows-excluded branch from 68ca5bf to 1dff66a Compare May 5, 2026 02:54
@anderdc
anderdc merged commit c571feb into entrius:test May 9, 2026
3 checks passed
@statxc

statxc commented May 9, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @anderdc

alpurkan17 pushed a commit to alpurkan17/gittensor that referenced this pull request May 10, 2026
…ntrius#990)

Co-authored-by: Ander <61125407+anderdc@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] gitt miner post/check error path discards excluded validator list when --min-stake / --min-vtrust filters eliminate all candidates

2 participants