Skip to content

feat(miner-governor): enforce non-convergence + budget/turn/termination halts #2347

Description

@JSONbored

Wire the two previously-built pure signals — the non-convergence detector and the budget/turn/termination cap calculator (both companion wave-2 issues) — into the actual run-loop termination path, so a run that is genuinely stuck or has exhausted its caps is HALTED rather than merely flagged. This is the enforcement half of both signals — the underlying calculators are already contributor-built and tested. Its failure mode is a stuck loop continuing to burn compute/attempts, not an unsafe write — the independent submission-gate chokepoint still blocks any bad output regardless. Open, scored contributor work, provided the halt/release behavior below is thoroughly tested.

Deliverables

  • The run loop consults detectNonConvergence and evaluateBudgetCaps on every iteration boundary, before claiming the next portfolio-queue item
  • Either signal tripping halts the CURRENT run cleanly (marks in-flight portfolio items as failed/released, not silently abandoned) and prevents claiming further items until a human clears the halt
  • The halt reason (non-convergence vs. specific budget dimension) and full context are recorded to the governor ledger
  • Integration tests: a simulated flapping run loop halts within the configured detection window and releases its in-flight queue item; a simulated budget-cap breach halts immediately on the next iteration boundary; a healthy run under both signals is never halted

References

  • The non-convergence detector (companion wave-2 foundation issue) and the budget/turn/termination cap calculator (companion wave-2 foundation issue) — this issue is their shared enforcement wiring
  • PortfolioQueueManager.markFailed (companion wave-2 issue) — used to cleanly release the halted run's in-flight item
  • The Governor chokepoint (companion maintainer issue) — this halt path is invoked from the same run-loop boundary the chokepoint gates writes at

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions