mirror of
https://github.com/boshu2/agentops.git
synced 2026-09-14 15:08:13 +08:00
cba058c6ab
The bushido continuous-validation backstop: watch main -> full gate on each new commit -> classify deterministic-vs-flaky (re-run N=3; the 18-30% flake rate makes naive escalation noise) -> on deterministic blocking FAIL: poison beacon (.refinery-poison + git note) + fix-bead (bd create) + alert. NEVER reverts (P2.5 quorum-gated revert deferred to ag-k99u). Backstop-not-gatekeeper: down = merges still succeed; resumes from .refinery-state. Injectable ports (git/bd/ gates adapters); core tested with fakes (deterministic escalates, flaky doesn't, green clears, never-reverts). ao refinery once|run; systemd unit + runbook for bushido. go test green. ag-qidx.
36 lines
753 B
Go
36 lines
753 B
Go
package main
|
|
|
|
import "testing"
|
|
|
|
func TestRefineryCmd_Registered(t *testing.T) {
|
|
var found bool
|
|
for _, c := range rootCmd.Commands() {
|
|
if c.Name() == "refinery" {
|
|
found = true
|
|
}
|
|
}
|
|
if !found {
|
|
t.Fatal("`ao refinery` not registered on root")
|
|
}
|
|
}
|
|
|
|
func TestRefineryCmd_HasSubcommands(t *testing.T) {
|
|
want := map[string]bool{"once": false, "run": false}
|
|
for _, c := range refineryCmd.Commands() {
|
|
if _, ok := want[c.Name()]; ok {
|
|
want[c.Name()] = true
|
|
}
|
|
}
|
|
for name, found := range want {
|
|
if !found {
|
|
t.Errorf("ao refinery missing subcommand %q", name)
|
|
}
|
|
}
|
|
}
|
|
|
|
func TestRefineryRun_HasIntervalFlag(t *testing.T) {
|
|
if refineryRunCmd.Flags().Lookup("interval") == nil {
|
|
t.Error("ao refinery run missing --interval flag")
|
|
}
|
|
}
|