Skip to content

Persist nonrecoverable miner invalidation#544

Open
wang-tong0 wants to merge 1 commit into
mainfrom
invalid-recovery-policy
Open

Persist nonrecoverable miner invalidation#544
wang-tong0 wants to merge 1 commit into
mainfrom
invalid-recovery-policy

Conversation

@wang-tong0

Copy link
Copy Markdown
Collaborator

Summary

  • Persist nonrecoverable miner invalidation reasons on miner_stats so later monitor refreshes cannot silently restore the same (hotkey, revision) to valid.
  • Restrict automatic invalid-to-valid recovery to no_commit and transient infrastructure failures such as HF fetch/tokenizer/template fetch errors.
  • Treat deterministic HF/model problems, plagiarism, anticopy copy verdicts, model checks, revision mismatches, and gated/private/not-found repos as nonrecoverable for the current revision.

Root Cause

miners.is_valid is rewritten by every monitor refresh. Some miner-attributable invalid states were only represented in the current UID-keyed miners row, so a later refresh could overwrite them with is_valid=true once the immediate detection condition disappeared.

Validation

python -m py_compile affine/src/monitor/miners_monitor.py affine/database/dao/miner_stats.py
python -m pytest tests/test_dao_adapters.py tests/test_anticopy_monitor_step8.py tests/test_miners_monitor_gated.py tests/test_challenger_queue.py -q
git diff --check

Result: 41 passed.

@wang-tong0 wang-tong0 marked this pull request as ready for review June 15, 2026 08:41
@wang-tong0 wang-tong0 force-pushed the invalid-recovery-policy branch from c4cb8d5 to ed7f53c Compare June 15, 2026 08:55
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.

1 participant