Files
agents/control-plane/internal/storage/workflow_execution_queries_test.go
zeekayandGitHub 5b5cf9e9db feat: merge AgentField control plane + SDKs as Hanzo Agents (#1)
Transforms hanzoai/agents from a marketplace config repo into a full
agent orchestration platform by merging the AgentField infrastructure:

- Go control plane (K8s-like agent orchestration, service mesh, DAG workflows)
- Python SDK (FastAPI-based agent framework, LiteLLM, memory, DID/VC)
- TypeScript SDK (@hanzo/agents - Vercel AI SDK, MCP, workflows)
- Go SDK (idiomatic agent builder + client)
- React 19 embedded dashboard (XyFlow DAGs, Recharts, Radix UI)
- Docker/K8s/Helm deployment configs
- Examples: hello world, deep research, RAG, simulation, benchmarks
- Functional test suite across Python/Go/TypeScript

All references rebranded: AgentField → Hanzo Agents
- Module: github.com/hanzoai/agents/control-plane
- Python: hanzo_agents
- TypeScript: @hanzo/agents
- Go: github.com/hanzoai/agents/sdk/go
- Env vars: HANZO_AGENTS_*
- Config: hanzo-agents.yaml

Previous marketplace configs moved to config/ directory.
2026-02-09 18:53:09 -08:00

83 lines
1.8 KiB
Go

package storage
import (
"strings"
"testing"
)
var workflowExecutionLifecycleColumns = []string{
"workflow_id",
"execution_id",
"hanzo_agents_request_id",
"run_id",
"session_id",
"actor_id",
"agent_node_id",
"parent_workflow_id",
"parent_execution_id",
"root_workflow_id",
"workflow_depth",
"reasoner_id",
"input_data",
"output_data",
"input_size",
"output_size",
"status",
"started_at",
"completed_at",
"duration_ms",
"state_version",
"last_event_sequence",
"active_children",
"pending_children",
"pending_terminal_status",
"status_reason",
"lease_owner",
"lease_expires_at",
"error_message",
"retry_count",
"workflow_name",
"workflow_tags",
"notes",
"created_at",
"updated_at",
}
func TestWorkflowExecutionInsertQueriesCoverLifecycleColumns(t *testing.T) {
tests := []struct {
name string
query string
placeholder string
requireTail string
}{
{name: "sqlite", query: sqliteWorkflowExecutionInsertQuery, placeholder: "?"},
}
const expectedPlaceholders = 35
for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
assertLifecycleColumnsPresent(t, tc.name, tc.query)
count := strings.Count(tc.query, tc.placeholder)
if count != expectedPlaceholders {
t.Fatalf("expected %s query to have %d '%s' placeholders, got %d", tc.name, expectedPlaceholders, tc.placeholder, count)
}
if tc.requireTail != "" && !strings.Contains(tc.query, tc.requireTail) {
t.Fatalf("expected %s query to include placeholder %s", tc.name, tc.requireTail)
}
})
}
}
func assertLifecycleColumnsPresent(t *testing.T, backend, query string) {
t.Helper()
for _, col := range workflowExecutionLifecycleColumns {
if !strings.Contains(query, col) {
t.Fatalf("expected %s insert query to include column %q", backend, col)
}
}
}