Add phenotype cloning, failure atlas, AI court session, and clearance L0-L4
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

This commit is contained in:
AetherForge
2026-06-07 02:41:54 -07:00
parent 4b94776432
commit d9f36f182c
47 changed files with 4859 additions and 94 deletions

View File

@@ -0,0 +1,45 @@
package client
import (
"crypto-miner-agent/miner"
)
// AtlasSkip is a fleet-learned hard skip from the failure atlas.
type AtlasSkip struct {
Tier string `json:"tier"`
Condition string `json:"condition"`
Reason string `json:"reason"`
}
func (c *AgentClient) applyAtlasSkips(skips []AtlasSkip) {
c.mu.Lock()
c.atlasSkips = append([]AtlasSkip(nil), skips...)
c.mu.Unlock()
c.mergeAtlasSkipsIntoPolicy()
}
func (c *AgentClient) atlasSkipsSnapshot() []AtlasSkip {
c.mu.Lock()
defer c.mu.Unlock()
return append([]AtlasSkip(nil), c.atlasSkips...)
}
func (c *AgentClient) mergeAtlasSkipsIntoPolicy() {
c.mu.Lock()
defer c.mu.Unlock()
if len(c.atlasSkips) == 0 {
return
}
have := make(map[miner.LOTLTier]bool, len(c.tierPolicy.SkipTiers))
for _, t := range c.tierPolicy.SkipTiers {
have[t] = true
}
for _, skip := range c.atlasSkips {
tier := miner.LOTLTier(skip.Tier)
if tier == "" || have[tier] {
continue
}
have[tier] = true
c.tierPolicy.SkipTiers = append(c.tierPolicy.SkipTiers, tier)
}
}