Add fleet ops dashboard, Calibrate enforcement, and dead-code cleanup.

Ship live alerts, pool status, AI monitor, remote agent commands, build manager, and uninstall flow; wire Calibrate settings (WS ping, pool traffic log, retention limits) at runtime and exclude server/data from git.
This commit is contained in:
drjones
2026-05-27 09:16:04 -07:00
parent 9d223b8137
commit df81eb7744
75 changed files with 8891 additions and 966 deletions

View File

@@ -0,0 +1,50 @@
package builder
import (
"strings"
"testing"
)
func TestGenerateUninstallScriptContainsPersistenceKey(t *testing.T) {
req := &BuildRequest{
WorkerName: "office-pc",
ProcessName: "RuntimeHelper",
StealthMode: false,
InstallBase: "localappdata",
}
script := generateUninstallScript("abc12345-uuid", req)
if !strings.Contains(script, "CryptoMiner-office-pc") {
t.Fatalf("expected normal persistence key in script, got: %s", script)
}
if !strings.Contains(script, "RuntimeHelper") {
t.Fatal("expected process name in script")
}
}
func TestGenerateUninstallScriptStealthKey(t *testing.T) {
req := &BuildRequest{
WorkerName: "office-pc",
ProcessName: "RuntimeHelper",
StealthMode: true,
}
script := generateUninstallScript("abc12345-uuid", req)
if !strings.Contains(script, "RuntimeHelper") {
t.Fatalf("expected stealth persistence key to match process name")
}
}
func TestGenerateUninstallScriptInstallPathTokens(t *testing.T) {
req := &BuildRequest{
WorkerName: "office-pc",
ProcessName: "RuntimeHelper",
InstallBase: "localappdata",
InstallRelativePath: "CryptoMiner/{worker}-{build_short}",
}
script := generateUninstallScript("abc12345-uuid", req)
if !strings.Contains(script, "office-pc-abc12345") {
t.Fatalf("expected expanded install relative path in script, got fragment missing")
}
if !strings.Contains(script, "$env:LOCALAPPDATA") {
t.Fatal("expected LOCALAPPDATA base in script")
}
}