Add Strain Hospice for graceful low-win strain retirement.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

Archive failed epidemiology strains to museum hospice with SQLite persistence, operator/AI/court triggers, breeding and graft guards, topology museum nodes, and Seer plus oath ledger accountability.
This commit is contained in:
AetherForge
2026-06-07 09:26:39 -07:00
parent 894b7a50ae
commit d605ef4adb
18 changed files with 701 additions and 18 deletions

View File

@@ -0,0 +1,26 @@
package strategy
import "testing"
func TestShouldAutoRetireStrain(t *testing.T) {
if !ShouldAutoRetireStrain(1, 9, 0.15, 5) {
t.Fatal("10% win rate with 10 attempts should retire at 15% threshold")
}
if ShouldAutoRetireStrain(1, 3, 0.15, 5) {
t.Fatal("min attempts not met")
}
if StrainWinRate(0, 0) != 1.0 {
t.Fatalf("empty stats should be 1.0, got %v", StrainWinRate(0, 0))
}
}
func TestLaneInHospice(t *testing.T) {
strain := StrainFromSpreadLane("winrm")
hospice := map[string]bool{strain: true}
if !LaneInHospice("winrm", hospice) {
t.Fatalf("winrm strain %s should be in hospice", strain)
}
if LaneInHospice("docker", hospice) {
t.Fatal("docker lane should not match winrm hospice entry")
}
}