Skip to content

fix: exit 1 when zero validators accept or have PAT stored#559

Closed
Tet-9 wants to merge 2 commits into
entrius:testfrom
Tet-9:fix/miner-post-check-exit-code
Closed

fix: exit 1 when zero validators accept or have PAT stored#559
Tet-9 wants to merge 2 commits into
entrius:testfrom
Tet-9:fix/miner-post-check-exit-code

Conversation

@Tet-9
Copy link
Copy Markdown
Contributor

@Tet-9 Tet-9 commented Apr 18, 2026

Fixes #542

Problem

Both miner post and miner check exit with code 0 even when
accepted_count == 0 or valid_count == 0. This means CI/CD pipelines
treating exit codes as success/failure indicators will incorrectly treat
a failed broadcast as success.

Fix

Added sys.exit(1) after the display block in both commands when the
operation produced zero successful results.

Changes

  • gittensor/cli/miner_commands/post.py — exit 1 when accepted_count == 0
  • gittensor/cli/miner_commands/check.py — exit 1 when valid_count == 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

miner check/post exit 0 when zero validators accept PAT

3 participants