Data Model
Primary types live in pkg/api. JSON Schema contracts (wire/public shape) live under spec/schemas/. Go Validate() methods enforce semantic invariants beyond structural shape — keep both aligned for closed enums (assertion types, failure modes, etc.).
Schema compatibility
AgentRun.schema_version is currently 0.5 (api.SchemaVersion). On the 0.x line, Gust requires an exact match — unknown or older versions are rejected by Validate().
Planned policy for a future 1.x line:
- Readers accept the same major version (forward-compatible within the major).
- Writers emit one canonical version.
- A migrate helper may appear when the schema actually bumps; until then, treat
0.5as the only supported wire version.
max_steps counts top-level tool and agent spans only (not nested llm / retrieval sub-steps).
AgentRun
Captured or synthesized execution trace:
run_id,agent,task,trace[](Span),outcome, optionalmetadata- Spans carry type (
agent,llm,tool, …), timing, attributes, status
Fixture
Recorded or authored tool response used for Replay / Test mocking:
fixture_id,tool,input_hash, match strategy, recorded I/O- Failure modes:
success,timeout,malformed,slow,partial_failure,recorded_error(captured from a real error span) -
Provenance: recordedauthored
Match strategies: exact hash, ordered sequence (FIFO), hybrid (prefer exact then sequence).
TestScenario
The real test artifact:
task— what to ask the agentenvironment.fixtures/fixtures_dir— controlled world (bodies usually live as JSON files)assertions/assertion_files/$ref— independent expectations (never auto-copied from a buggy trace)reliability— samples, minimum pass rate, confidenceprovenance— extraction metadata and human review fields
Assertion
Typed checks (tool_call, forbidden_tool_call, max_steps, …) with optional criticality (hard |
soft). |
Policy
CI acceptance gate:
- Hard constraints: max allowed failed
forbidden_tool/schema_validationevaluations (0= zero tolerance). Those named counts fail CI immediately when exceeded. Other assertions withcriticality: hardfail the sample (Wilson);criticality: softis recorded but does not fail the sample. - Reliability defaults (
default_minimum_pass_rateapplied when a scenario omitsminimum_pass_rate),on_flaky, optionalmax_execution_error_rate(omit → 0.20;0→ zero tolerance), optionalretry - Regression thresholds (pass-rate drop, latency increase). Unmeasurable baseline latency omits
latency_increase_ratiorather than reporting0.0.
Project-level execution knobs (concurrency, timeouts, retry) live in gust.yaml. Local filesystem caches for scenarios/runs are mutable by ID; content-addressed immutability is gust dataset bundle / verify.
ReliabilityResult
Mode 3 aggregate:
scenario_id,samples,passes,observed_pass_rateconfidence_interval[lower, upper]verdict, optionalper_run_evidence
Content addressing
pkg/jcs implements RFC 8785 JSON Canonicalization Scheme. Content hashes (SHA-256 over canonical bytes) identify fixtures and dataset manifests so comparisons are bit-for-bit stable across languages and formatters.
gust dataset bundle <dir> --id <name> writes scenario JSON plus dataset.json. Re-bundling the same ID with different content is a hard error unless --force; orphans are pruned only with --force. gust dataset verify <dir> checks hashes.