Add mining self-surgery for on-host recovery when AI control detects stalls.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

When ai_control_enabled and mining interrupts or hashrate drops, the server composes same-agent fix plans (container restart, chain reorder, GPU swap, idle tune, RandomX restart) with Seer and oath ledger audit — no spread or lateral escalation.
This commit is contained in:
AetherForge
2026-06-07 09:27:26 -07:00
parent d605ef4adb
commit fac324ff80
18 changed files with 1166 additions and 0 deletions

View File

@@ -33,6 +33,15 @@ func NewEngine() *Engine {
return &Engine{cache: cache}
}
// Reset clears the VM so the next SetJob reinitializes RandomX state.
func (e *Engine) Reset() {
e.mu.Lock()
defer e.mu.Unlock()
e.vm = nil
e.seedHex = ""
e.blob = nil
}
func (e *Engine) SetJob(seedHex, blobHex string) error {
seed, err := hex.DecodeString(seedHex)
if err != nil {