Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Prosecutor and Public Defender use real fleet telemetry only; Judge dispatches L4 commands and emits full transcripts via seer_events and emberwake_court_debate when ai_control_enabled.
33 lines
782 B
Go
33 lines
782 B
Go
package ai
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
)
|
|
|
|
// ExpandSurgicalCommand maps surgical fix types to executable fleet commands.
|
|
func ExpandSurgicalCommand(cmd Command) []Command {
|
|
switch cmd.Type {
|
|
case CmdSpreadRetryLane:
|
|
return []Command{ResolveSpreadRetryLane(cmd.Args)}
|
|
case CmdSkipTier:
|
|
return []Command{ResolveSkipTier(cmd.Args)}
|
|
case CmdPersonaTweak, CmdEnableErasure, CmdSpreadGraft:
|
|
return []Command{cmd}
|
|
default:
|
|
return []Command{cmd}
|
|
}
|
|
}
|
|
|
|
// FormatSurgicalFixArgs serializes command args for strain memory storage.
|
|
func FormatSurgicalFixArgs(cmd Command) string {
|
|
if cmd.Args == nil {
|
|
return ""
|
|
}
|
|
parts := make([]string, 0, len(cmd.Args))
|
|
for k, v := range cmd.Args {
|
|
parts = append(parts, fmt.Sprintf("%s=%v", k, v))
|
|
}
|
|
return strings.Join(parts, ",")
|
|
}
|