Files
boshu2__agentops/cli/cmd/ao/refinery_test.go
T
Boden Fuller cba058c6ab feat(refinery): ao refinery backstop daemon (ag-qidx P2.1-2.4,2.6)
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.
2026-06-07 10:57:08 -04:00

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")
}
}