pub const JSON_SCHEMA: &str = {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/Chelis-Lang/sail/crates/sail-api/schema/verify-output-v2.json",
"title": "sail verify --output json, schema version 2",
"description": "See docs/output-schema.md. Within version 2, fields are only ever added; consumers must ignore unknown fields. This schema is strict (additionalProperties false) so that sail's own tests catch drift.",
"type": "object",
"required": ["schema_version", "sail_version", "mode", "command", "exit_code", "solver", "cache", "attribution", "crates", "diagnostics", "summary", "error"],
"additionalProperties": false,
"properties": {
"portfolio": {"$ref": "#/$defs/portfolio"},
"engine": {"$ref": "#/$defs/engine"},
"schema_version": { "const": 2 },
"sail_version": { "type": "string" },
"mode": { "type": "string" },
"command": { "type": "array", "items": { "type": "string" } },
"exit_code": { "type": ["integer", "null"] },
"solver": {
"oneOf": [
{ "type": "null" },
{
"type": "object",
"required": ["name", "version", "path", "sha256"],
"additionalProperties": false,
"properties": {
"name": { "type": "string" },
"version": { "type": ["string", "null"] },
"path": { "type": ["string", "null"] },
"sha256": { "type": ["string", "null"] }
}
}
]
},
"cache": {
"type": "object",
"required": ["daemon"],
"additionalProperties": false,
"properties": { "daemon": { "type": "boolean" } }
},
"attribution": {
"type": "object",
"required": ["status", "notes", "unmatched_sessions"],
"additionalProperties": false,
"properties": {
"status": { "enum": ["complete", "partial", "unavailable"] },
"notes": { "type": "array", "items": { "type": "string" } },
"unmatched_sessions": { "type": "integer", "minimum": 0 }
}
},
"crates": { "type": "array", "items": { "$ref": "#/$defs/crate" } },
"diagnostics": { "type": "array", "items": { "$ref": "#/$defs/diagnostic" } },
"summary": {
"type": "object",
"required": ["functions", "verified", "failed", "unknown", "provisional", "unstable"],
"additionalProperties": false,
"properties": {
"functions": { "type": "integer", "minimum": 0 },
"verified": { "type": "integer", "minimum": 0 },
"failed": { "type": "integer", "minimum": 0 },
"unknown": { "type": "integer", "minimum": 0 },
"provisional": { "type": "integer", "minimum": 0 },
"unstable": { "type": "integer", "minimum": 0 }
}
},
"error": {
"oneOf": [
{ "type": "null" },
{
"type": "object",
"required": ["code", "message"],
"additionalProperties": false,
"properties": {
"code": { "type": "string" },
"message": { "type": "string" }
}
}
]
}
},
"$defs": {
"engine": {
"type": "object",
"required": ["name", "manifest_sha256", "established_by"],
"additionalProperties": false,
"properties": {
"name": { "type": "string" },
"manifest_sha256": { "type": "string" },
"established_by": { "enum": ["engine", "stock-fallback"] }
}
},
"solver_configuration": {
"type": "object",
"required": [
"seed"
],
"additionalProperties": false,
"properties": {
"seed": {
"type": "integer",
"minimum": 0
}
}
},
"portfolio": {
"type": "object",
"required": [
"seeds",
"winner_seed",
"attempts"
],
"additionalProperties": false,
"properties": {
"seeds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
}
},
"winner_seed": {
"type": [
"integer",
"null"
]
},
"attempts": {
"type": "array",
"items": {
"$ref": "#/$defs/portfolio_attempt"
}
}
}
},
"portfolio_attempt": {
"type": "object",
"required": [
"configuration",
"verified",
"exit_code",
"wall_ms",
"error",
"report",
"stderr"
],
"additionalProperties": false,
"properties": {
"configuration": {
"$ref": "#/$defs/solver_configuration"
},
"verified": {
"type": "boolean"
},
"exit_code": {
"type": [
"integer",
"null"
]
},
"wall_ms": {
"type": "number",
"minimum": 0
},
"error": {
"type": [
"string",
"null"
]
},
"report": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/$defs/attempt_report"
}
]
},
"stderr": {
"type": "string"
}
}
},
"attempt_report": {
"type": "object",
"required": [
"schema_version",
"sail_version",
"mode",
"command",
"exit_code",
"solver",
"cache",
"attribution",
"crates",
"diagnostics",
"summary",
"error"
],
"additionalProperties": false,
"properties": {
"schema_version": {
"const": 2
},
"sail_version": {
"type": "string"
},
"mode": {
"type": "string"
},
"command": {
"type": "array",
"items": {
"type": "string"
}
},
"exit_code": {
"type": [
"integer",
"null"
]
},
"solver": {
"oneOf": [
{
"type": "null"
},
{
"type": "object",
"required": [
"name",
"version",
"path",
"sha256"
],
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"version": {
"type": [
"string",
"null"
]
},
"path": {
"type": [
"string",
"null"
]
},
"sha256": {
"type": [
"string",
"null"
]
}
}
}
]
},
"cache": {
"type": "object",
"required": [
"daemon"
],
"additionalProperties": false,
"properties": {
"daemon": {
"type": "boolean"
}
}
},
"attribution": {
"type": "object",
"required": [
"status",
"notes",
"unmatched_sessions"
],
"additionalProperties": false,
"properties": {
"status": {
"enum": [
"complete",
"partial",
"unavailable"
]
},
"notes": {
"type": "array",
"items": {
"type": "string"
}
},
"unmatched_sessions": {
"type": "integer",
"minimum": 0
}
}
},
"crates": {
"type": "array",
"items": {
"$ref": "#/$defs/crate"
}
},
"diagnostics": {
"type": "array",
"items": {
"$ref": "#/$defs/diagnostic"
}
},
"summary": {
"type": "object",
"required": [
"functions",
"verified",
"failed",
"unknown",
"provisional",
"unstable"
],
"additionalProperties": false,
"properties": {
"functions": {
"type": "integer",
"minimum": 0
},
"verified": {
"type": "integer",
"minimum": 0
},
"failed": {
"type": "integer",
"minimum": 0
},
"unknown": {
"type": "integer",
"minimum": 0
},
"provisional": {
"type": "integer",
"minimum": 0
},
"unstable": {
"type": "integer",
"minimum": 0
}
}
},
"error": {
"oneOf": [
{
"type": "null"
},
{
"type": "object",
"required": [
"code",
"message"
],
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
]
}
}
},
"u64_or_null": { "oneOf": [{ "type": "null" }, { "type": "integer", "minimum": 0 }] },
"crate": {
"type": "object",
"required": ["name", "verus", "functions"],
"additionalProperties": false,
"properties": {
"name": { "type": ["string", "null"] },
"verus": {
"type": "object",
"required": ["verified", "errors", "success", "encountered_vir_error"],
"additionalProperties": false,
"properties": {
"verified": { "$ref": "#/$defs/u64_or_null" },
"errors": { "$ref": "#/$defs/u64_or_null" },
"success": { "type": ["boolean", "null"] },
"encountered_vir_error": { "type": ["boolean", "null"] }
}
},
"functions": { "type": "array", "items": { "$ref": "#/$defs/function" } }
}
},
"function": {
"type": "object",
"required": ["function", "module", "fn_mode", "verdict", "establishment", "evidence_tier", "unstable", "verus_success", "provenance", "timing", "fragility", "obligations"],
"additionalProperties": false,
"properties": {
"function": { "type": "string" },
"module": { "type": "string" },
"fn_mode": { "type": ["string", "null"] },
"verdict": { "enum": ["verified", "failed", "unknown", "provisional"] },
"establishment": { "enum": ["confirmed", "provisional"] },
"evidence_tier": { "enum": ["sampled", "bounded", "smt_verified", "certificate_checked", "kernel_checked", null] },
"unstable": { "type": "boolean" },
"verus_success": { "type": ["boolean", "null"] },
"provenance": {
"type": "object",
"required": ["mode", "source", "checks_solved", "checks_served", "checks_unrecorded"],
"additionalProperties": false,
"properties": {
"mode": { "type": "string" },
"source": { "enum": ["fresh", "cache", "mixed", "unrecorded"] },
"configuration": {"$ref": "#/$defs/solver_configuration"},
"engine": {"$ref": "#/$defs/engine"},
"checks_solved": { "type": "integer", "minimum": 0 },
"checks_served": { "type": "integer", "minimum": 0 },
"checks_unrecorded": { "type": "integer", "minimum": 0 }
}
},
"timing": {
"type": "object",
"required": ["smt_micros", "rlimit"],
"additionalProperties": false,
"properties": {
"smt_micros": { "$ref": "#/$defs/u64_or_null" },
"rlimit": { "$ref": "#/$defs/u64_or_null" }
}
},
"health": { "$ref": "#/$defs/function_health" },
"fragility": {
"description": "Reserved: null until fragility is measured.",
"oneOf": [
{ "type": "null" },
{
"type": "object",
"required": ["score", "runs", "proved"],
"additionalProperties": false,
"properties": {
"score": { "type": "number", "minimum": 0 },
"runs": { "type": "integer", "minimum": 0 },
"proved": { "type": "integer", "minimum": 0 }
}
}
]
},
"obligations": {
"oneOf": [
{ "type": "null" },
{ "type": "array", "items": { "$ref": "#/$defs/obligation" } }
]
}
}
},
"function_health": {
"type": "object",
"additionalProperties": false,
"required": ["attributed", "complete", "checks", "measured_checks", "near_limit_checks", "exhausted_checks", "unlimited_checks", "unrecorded_checks", "peak"],
"properties": {
"attributed": {"type": "boolean"},
"complete": {"type": "boolean"},
"checks": {"type": "integer", "minimum": 0},
"measured_checks": {"type": "integer", "minimum": 0},
"near_limit_checks": {"type": "integer", "minimum": 0},
"exhausted_checks": {"type": "integer", "minimum": 0},
"unlimited_checks": {"type": "integer", "minimum": 0},
"unrecorded_checks": {"type": "integer", "minimum": 0},
"peak": {"oneOf": [
{"type": "null"},
{"type": "object", "additionalProperties": false,
"required": ["used", "limit"], "properties": {
"used": {"type": "integer", "minimum": 0},
"limit": {"type": "integer", "minimum": 1}
}}
]}
}
},
"obligation": {
"type": "object",
"required": ["id", "kind", "ordinal", "spinoff", "advisory", "span", "outcome", "unstable", "checks", "counterexample"],
"additionalProperties": false,
"properties": {
"id": { "type": "string" },
"kind": { "type": "string" },
"ordinal": { "type": "integer", "minimum": 0 },
"spinoff": {
"oneOf": [
{ "type": "null" },
{
"type": "object",
"required": ["index", "reason"],
"additionalProperties": false,
"properties": {
"index": { "type": "integer", "minimum": 0 },
"reason": { "type": ["string", "null"] }
}
}
]
},
"advisory": { "type": "boolean" },
"span": {
"oneOf": [
{ "type": "null" },
{
"type": "object",
"required": ["text", "file", "line", "column", "end_line", "end_column"],
"additionalProperties": false,
"properties": {
"text": { "type": "string" },
"file": { "type": ["string", "null"] },
"line": { "$ref": "#/$defs/u64_or_null" },
"column": { "$ref": "#/$defs/u64_or_null" },
"end_line": { "$ref": "#/$defs/u64_or_null" },
"end_column": { "$ref": "#/$defs/u64_or_null" }
}
}
]
},
"outcome": { "enum": ["proved", "failed", "unknown"] },
"unstable": { "type": "boolean" },
"checks": {
"type": "array",
"items": {
"type": "object",
"required": ["answer", "rlimit_limit", "rlimit_used", "reason_unknown", "source"],
"additionalProperties": false,
"properties": {
"answer": { "enum": ["sat", "unsat", "unknown", null] },
"rlimit_limit": { "$ref": "#/$defs/u64_or_null" },
"rlimit_used": { "$ref": "#/$defs/u64_or_null" },
"reason_unknown": { "type": ["string", "null"] },
"source": { "enum": ["solved", "cache", null] }
}
}
},
"counterexample": {
"oneOf": [
{ "type": "null" },
{
"type": "object",
"required": ["check", "model", "assignments"],
"additionalProperties": false,
"properties": {
"check": { "type": "integer", "minimum": 0 },
"model": { "type": "string" },
"assignments": {
"type": "array",
"items": {
"type": "object",
"required": ["name", "sort", "value", "itf"],
"additionalProperties": false,
"properties": {
"name": { "type": "string" },
"sort": { "type": "string" },
"value": { "type": "string" },
"itf": { "$ref": "#/$defs/itf_value" }
}
}
}
}
}
]
}
}
},
"itf_value": {
"description": "An ITF (Informal Trace Format) value: a rendering of the verbatim value, never a replacement for it.",
"oneOf": [
{ "type": "boolean" },
{
"type": "object",
"required": ["#bigint"],
"additionalProperties": false,
"properties": { "#bigint": { "type": "string" } }
},
{
"type": "object",
"required": ["#unserializable"],
"additionalProperties": false,
"properties": { "#unserializable": { "type": "string" } }
}
]
},
"diagnostic": {
"type": "object",
"required": ["level", "code", "message", "spans", "rendered"],
"additionalProperties": false,
"properties": {
"level": { "type": "string" },
"code": { "type": ["string", "null"] },
"message": { "type": "string" },
"spans": {
"type": "array",
"items": {
"type": "object",
"required": ["file", "line", "column", "primary"],
"additionalProperties": false,
"properties": {
"file": { "type": "string" },
"line": { "type": "integer", "minimum": 0 },
"column": { "type": "integer", "minimum": 0 },
"primary": { "type": "boolean" }
}
}
},
"rendered": { "type": "string" }
}
}
}
}
;Expand description
The JSON Schema (draft 2020-12) for schema version 2.