Documentation
¶
Overview ¶
Package matrix runs the real runkite binary against every meaningful (state backend x transport x framework runner) combination, each exercising the scenarios that framework's example agents actually support, and diffs the resulting event sequence against a recorded golden fixture (see golden.go).
Deliberately NOT a full cross-product: backend correctness (SQLite/ Postgres/MySQL/Mongo state; in-process/Redis transport) is already proven independently and exhaustively by internal/state/conformance and internal/transport/conformance. What THIS package proves is the integration seam those suites can't see -- that a real framework adapter's runner, talking to a real control plane over real gRPC, behaves identically regardless of which backend is plugged in behind it. Four backend combinations are enough to prove that: one zero-infra path (SQLite+in-process, the `runkite dev` experience most new users hit first) and three infra-backed combinations spanning every state store this project ships.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendSpec ¶
type BackendSpec struct {
Name string
// Env returns the extra environment variables to append to the
// control plane's process environment, or (nil, reason) if a
// required env var isn't set (e.g. POSTGRES_DSN for postgres_redis).
Env func() (env []string, skipReason string)
}
BackendSpec describes one state+transport combination the control plane can be started with. Skip is populated lazily by requiredEnv() once the corresponding env var is confirmed unset, so a developer without the full docker-compose.test.yml stack running still gets a clear skip reason instead of a hang or a cryptic connection error.
type LaunchedProcess ¶
LaunchedProcess is what a RunnerSpec.Launch func hands back to startCell: the running command plus its captured log, so a cell's diagnostics() can print the runner's own output on failure without startCell needing to know anything about how that runner was invoked.
type NormalizedRun ¶
type NormalizedRun struct {
EventTypes []string `json:"event_types"`
FinalStatus string `json:"final_status"`
}
NormalizedRun is the structural shape a scenario's real, live output gets reduced to before comparing against a golden fixture. Timestamps, run/thread UUIDs, and exact wording from a framework's (fake, but not necessarily byte-stable) LLM are deliberately excluded -- this proves "the same kind of thing happened, in the same order, ending the same way" across every backend a scenario runs against, which is the actual compatibility claim worth making. It is NOT a substitute for the runner-protocol/examples/*.json fixture format or PROTOCOL.md's richer per-method/per-namespace shape diff -- this is deliberately the lighter matrix-scale version of that same idea, scoped to what's cheap to keep golden across 30+ cells without becoming so brittle that every fake-LLM wording tweak breaks the whole matrix.
type RunnerSpec ¶
type RunnerSpec struct {
Name string
ConfigRelPath string // relative to repo root
AgentID string // for HappyPath
CancelAgentID string // for Cancel, "" if unsupported
ApprovalAgent string // for HITL, "" if unsupported
Scenarios []ScenarioKind
Launch func(env launchEnv) (LaunchedProcess, error)
StartupTimeout time.Duration
// RequiredVenvRelPath, if set, is checked for existence (as
// <path>/bin/python) before the control plane is even started --
// CrewAI/LlamaIndex/AutoGen each need their own isolated venv (see
// launchPythonModule's doc comment), and a developer without one set
// up should see a clean skip with a pointer to the README, not a
// wasted control-plane startup followed by a runner crash.
RequiredVenvRelPath string
}
RunnerSpec describes one framework runner: how to launch its subprocess, which example agent(s) it registers, and which scenarios (from scenarios.go) it supports. Not every framework supports every scenario -- cancel and human-in-the-loop interrupt are LangGraph- specific example agents (slow_agent/approval_agent); the other four frameworks' adapters only have a single-shot "happy path" example agent today (see python/adapters/*/test_adapter.py and their generic event sequence of lifecycle -> values -> end), so asking for more than HappyPath from them would need new example agents, not new matrix plumbing.
type ScenarioKind ¶
type ScenarioKind string
const ( // ScenarioHappyPath: create a thread, run to completion, verify a // clean event sequence ending in success. Every framework's example // agent supports this. ScenarioHappyPath ScenarioKind = "happy_path" // ScenarioCancel: start a long-running agent, cancel it mid-flight, // verify the run lands on "interrupted" (not "success" -- that would // mean cancellation had no effect) and the thread recovers instead // of staying stuck "busy". LangGraph-only today (slow_agent). ScenarioCancel ScenarioKind = "cancel" // ScenarioHITL: run an agent that calls interrupt() and pauses for // human approval, verify the run reaches "interrupted" with the // interrupt payload visible, then resume it and verify it completes. // LangGraph-only today (approval_agent). ScenarioHITL ScenarioKind = "hitl" // ScenarioHITLRestart: same as HITL, but the runner process is hard- // killed between interrupt and resume. Proves proxy opaque // checkpoints on the control plane (SQLite/MySQL/…) survive a runner // crash with no runner POSTGRES_DSN -- the P2a-4 exit criterion. ScenarioHITLRestart ScenarioKind = "hitl_restart" )