$ show openclaw/Kova
Kova is a validation lab for the OpenClaw runtime, designed to run release-shaped scenarios on real machines and collect structured evidence. It is a CLI tool written in Node.js (ESM) that orchestrates testing via the OpenClaw Control Manager (OCM), provisioning disposable environments, installing runtimes, and managing services. The system executes scenarios defined in declarative JSON contracts (surfaces, states, scenarios, profiles), collects performance metrics (RSS, CPU, latency, event-loop delays), and evaluates them against configurable thresholds. Results are produced as JSON reports, Markdown summaries, and a web dashboard built with Astro. The architecture is modular: a command dispatcher (src/main.mjs) routes to subcommands (run, matrix, report, setup, publish, self-check). The runner (src/runner.mjs) executes scenarios in phases, with collectors (src/collectors/) gathering evidence from processes, logs, timelines, and system state. An evaluator (src/evaluator.mjs) checks evidence against thresholds and produces violations. The reporting layer (src/reporting/) renders output in multiple formats. The system includes extensive self-checks (src/selfcheck/) that validate internal contracts and fixture behavior. Key external dependencies include Node.js, the OCM CLI, the OpenClaw runtime under test, and channel adapters (Telegram, Discord) for conformance testing. The codebase is well-structured with clear separation of concerns, reusable patterns (UI toolkit, evidence ledger, baseline management, channel conformance framework), and comprehensive validation of its own contracts.
The LLM identified 4 files worth highlighting for reuse:
Provides a terminal UI rendering toolkit with color, glyphs, tables, sparklines, badges, and layout primitives. It is environment-aware (NO_COLOR, CI, TTY) and produces structured output. This component is self-contained and can be extracted for use in any CLI application that requires rich terminal output.
Central evidence validation helpers including proof factories (commandProof, collectorProof) and invariant builders (compareSnapshotSetInvariant, zeroCountInvariant). These functions standardize evidence checking across scenarios and can be reused in any testing framework that needs to validate structured evidence against expected outcomes.
Manages persistent performance baselines with load/save/update/compare operations. Includes regression detection with threshold comparison and review gates. This pattern is reusable for any performance testing system that needs to track metric regressions over time.
Evaluates channel adapter behavior against workflow cases, checking delivery count, kind, text, media, and route preservation. Part of a reusable channel conformance testing framework that can be adapted to test any messaging channel adapter.