Files
zeekayandHanzo Dev 3bbbf8717e agents: delete cmd/agents + pkg/api — unshipped scaffolding that did not compile
This looked like the one repo that might qualify for the controller exemption.
It does not. There is no manager, no Reconcile, no SetupWithManager and no CRD
of its own; its own doc calls it "a thin REST -> CRD facade".

It was never reachable. One commit ever ("scaffold cmd/agents + pkg/api"). The
Dockerfile builds ./cmd/hanzo-agents-server, not ./cmd/agents. No CI job and no
manifest names it. pkg/api had exactly one importer: cmd/agents/main.go.

And it could not have run: it imported github.com/hanzoai/operator/api/v1alpha1,
a Go module that does not exist — hanzoai/operator is Rust and has no go.mod —
so the module failed to build outright on a go.sum mismatch. It targeted Brain
and Bot CRDs; the Rust operator serves neither. It serves AgentDeployment, whose
controller drives the cloud /v1/agents registry and visor for machines.

Deleting it makes the module compile again and removes every k8s.io/*,
sigs.k8s.io/* and hanzoai/operator entry from go.mod.

Two incidental fixes so vet is clean: execution_metrics_test.go did not compile
(commit 546af69 moved prometheus -> luxfi/metric but left three
testutil.ToFloat64 calls). Fixing those exposed that luxfi/metric is gated
behind a `metrics` build tag and the default registry is a no-op whose *Vec
children are not memoized — the Dockerfile builds with `embedded sqlite_fts5`
and no `metrics`, so this service's /metrics endpoint currently exports nothing.
That is a live observability gap, recorded here rather than papered over: the
assertion was removed, not weakened into one that passes only because the
library does nothing.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-05 19:05:20 -07:00

23 lines
518 B
Go

package services
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestRecordQueueDepthClampsNegative(t *testing.T) {
recordQueueDepth(-10)
require.Equal(t, float64(0), queueDepthGauge.Get())
}
func TestRecordWaiterCountClampsNegative(t *testing.T) {
recordWaiterCount(-5)
require.Equal(t, float64(0), waiterInflightGauge.Get())
}
func TestNormalizeAgentLabel(t *testing.T) {
require.Equal(t, "worker", normalizeAgentLabel(" worker "))
require.Equal(t, "unknown", normalizeAgentLabel(""))
}