sigilc test JSON Output Schema (Format Version 1)
This document describes the current machine-readable JSON emitted by:
cargo run -q -p sigil-cli --manifest-path language/compiler/Cargo.toml -- test
JSON is the default output mode for Sigil tests. For the higher-level debugging workflow and command selection guide, see language/docs/DEBUGGING.md.
The normative shared schema lives at:
language/spec/cli-json.schema.json
This page focuses on the current test-specific envelope shape.
Contract
- stdout contains a single JSON object
formatVersionis currently1- consumers should branch on
formatVersion
Top-Level Shape
{
"formatVersion": 1,
"command": "sigilc test",
"ok": true,
"summary": {
"files": 4,
"discovered": 13,
"selected": 13,
"passed": 13,
"failed": 0,
"errored": 0,
"stopped": 0,
"skipped": 0,
"durationMs": 619
},
"results": []
}
Fields
formatVersion
- type:
number - current value:
1
command
- type:
string - current value:
"sigilc test"
ok
- type:
boolean truewhen no tests failed or errored
summary
- aggregate counters for the run
results
- array of per-test results
- sorted deterministically by file, then location, then name
error (optional)
- present for runner/config/compiler-level failures where a normal test list is
not available
- uses the shared diagnostic envelope shape
summary
{
"files": 4,
"discovered": 13,
"selected": 13,
"passed": 13,
"failed": 0,
"errored": 0,
"skipped": 0,
"durationMs": 619
}
Field meanings:
files: number of.sigiltest files executeddiscovered: tests discovered before filteringselected: tests selected after--matchpassed: tests that returnedtruefailed: tests that returnedfalseerrored: tests that threw at runtimestopped: tests intentionally halted by stop-mode breakpointsskipped: reserved, currently0durationMs: total wall-clock duration
TestResult
Current aggregated result shape:
{
"id": "tests/todoDomain.sigil::todo add prepends item",
"file": "tests/todoDomain.sigil",
"name": "todo add prepends item",
"status": "pass",
"durationMs": 0,
"location": {
"line": 29,
"column": 1
}
}
Fields:
id: stable identifier:: file: source file pathname: test description stringnamemay contain newline characters when the source test description is multilinestatus:"pass" | "fail" | "error"status:"pass" | "fail" | "error" | "stopped"durationMs: per-test execution durationlocation: current aggregated location object withlineandcolumnfailure(optional): present forfailanderrortrace(optional): bounded inline trace data for that testbreakpoints(optional): bounded inline breakpoint hit data for that testreplay(optional): record/replay summary data for that testexception(optional): exact runtime exception context for errored tests
Stop-mode breakpoint hits are represented as ordinary test results:
{
"status": "stopped",
"breakpoints": {
"enabled": true,
"mode": "stop",
"stopped": true
}
}
Current output does not include:
declaredEffects- structured
assertionmetadata
failure
Boolean-false failure
{
"failure": {
"kind": "assert_false",
"message": "Test body evaluated to false"
}
}
Runtime exception
{
"failure": "Fs is denied by the current world",
"exception": {
"name": "Error",
"message": "Fs is denied by the current world",
"sigilExpression": {
"kind": "expr_extern_call"
}
}
}
Agent Guidance
- parse stdout as JSON directly
- check
okfirst - use
results[].idwith--matchfor focused reruns - use
results[].locationfor targeted edits
Related Docs
language/docs/DEBUGGING.mdlanguage/docs/TESTING.mdlanguage/spec/cli-json.mdlanguage/spec/cli-json.schema.jsonlanguage/spec/test-replay.schema.jsonlanguage/spec/debug-session.schema.json
Replay-Backed Stepping
sigil test replay artifacts can now drive sigil debug test sessions:
sigil debug test start --replay--test [--watch ...] sigil debug test snapshotsigil debug test step-intosigil debug test step-oversigil debug test step-outsigil debug test continuesigil debug test close
Those commands use the shared debug envelope documented in cli-json.md. Each debug snapshot also includes ordered watches results for any configured --watch local(.field)* selectors.