Skip to main content

JSON_SCHEMA

Constant JSON_SCHEMA 

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

The JSON Schema (draft 2020-12) for schema version 2.