175 lines
7.0 KiB
JSON
175 lines
7.0 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "final-report.schema.json",
|
|
"title": "09_final_report.json",
|
|
"type": "object",
|
|
"required": ["schema_version", "tool", "generated_at", "run_id", "route", "mode", "verdict", "document_verdict", "summary", "checks"],
|
|
"properties": {
|
|
"schema_version": {"const": "1.0"},
|
|
"tool": {"const": "verify_run"},
|
|
"generated_at": {"type": "string", "format": "date-time"},
|
|
"run_id": {"type": "string", "minLength": 1},
|
|
"route": {"enum": ["light", "standard", "deep"]},
|
|
"mode": {"enum": ["write", "revise", "review"]},
|
|
"verdict": {"enum": ["pass", "fail", "input_error"]},
|
|
"document_verdict": {"enum": ["pass", "revise", "not_evaluated"]},
|
|
"summary": {
|
|
"type": "object",
|
|
"required": ["passed", "failed", "required_artifacts", "omissions", "lint", "reviews", "status"],
|
|
"properties": {
|
|
"passed": {"type": "integer", "minimum": 0},
|
|
"failed": {"type": "integer", "minimum": 0},
|
|
"required_artifacts": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
|
|
"omissions": {"type": "array", "items": {"$ref": "#/$defs/omission"}},
|
|
"lint": {
|
|
"oneOf": [
|
|
{"$ref": "#/$defs/lintSummary"},
|
|
{"type": "null"}
|
|
]
|
|
},
|
|
"reviews": {
|
|
"type": "array",
|
|
"items": {"$ref": "#/$defs/reviewSummary"},
|
|
"uniqueItems": true
|
|
},
|
|
"status": {"type": ["string", "null"]}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"checks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["id", "status", "message"],
|
|
"properties": {
|
|
"id": {"type": "string", "minLength": 1},
|
|
"status": {"enum": ["pass", "fail", "error"]},
|
|
"message": {"type": "string", "minLength": 1},
|
|
"artifact": {"type": ["string", "null"]}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
},
|
|
"$defs": {
|
|
"omission": {
|
|
"type": "object",
|
|
"required": ["artifact", "reason"],
|
|
"properties": {
|
|
"artifact": {"type": "string", "minLength": 1},
|
|
"reason": {"type": "string", "minLength": 1, "pattern": "\\S"}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"fileHash": {
|
|
"type": "object",
|
|
"required": ["path", "sha256"],
|
|
"properties": {
|
|
"path": {"type": "string", "minLength": 1},
|
|
"sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"fidelityTypeSummary": {
|
|
"type": "object",
|
|
"required": ["total", "preserved", "missing"],
|
|
"properties": {
|
|
"total": {"type": "integer", "minimum": 0},
|
|
"preserved": {"type": "integer", "minimum": 0},
|
|
"missing": {"type": "integer", "minimum": 0}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"lintFidelity": {
|
|
"type": "object",
|
|
"required": ["baseline", "draft_baseline", "protected_total", "preserved", "missing", "by_type", "finalization_change_rate", "max_finalization_change_rate"],
|
|
"properties": {
|
|
"baseline": {"oneOf": [{"$ref": "#/$defs/fileHash"}, {"type": "null"}]},
|
|
"draft_baseline": {"oneOf": [{"$ref": "#/$defs/fileHash"}, {"type": "null"}]},
|
|
"protected_total": {"type": "integer", "minimum": 0},
|
|
"preserved": {"type": "integer", "minimum": 0},
|
|
"missing": {"type": "integer", "minimum": 0},
|
|
"by_type": {
|
|
"type": "object",
|
|
"additionalProperties": {"$ref": "#/$defs/fidelityTypeSummary"}
|
|
},
|
|
"finalization_change_rate": {"type": ["number", "null"], "minimum": 0, "maximum": 1},
|
|
"max_finalization_change_rate": {"type": "number", "minimum": 0, "maximum": 1}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"lintSummary": {
|
|
"type": "object",
|
|
"required": ["verdict", "fail_on", "rules_version", "rules_sha256", "document_sha256", "finding_counts", "finding_rule_ids", "fidelity", "limitations"],
|
|
"properties": {
|
|
"verdict": {"enum": ["pass", "fail"]},
|
|
"fail_on": {"enum": ["error", "warning"]},
|
|
"rules_version": {"type": "string", "minLength": 1},
|
|
"rules_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
|
"document_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
|
"finding_counts": {"$ref": "#/$defs/lintFindingCounts"},
|
|
"finding_rule_ids": {"type": "array", "items": {"type": "string", "minLength": 1}, "uniqueItems": true},
|
|
"fidelity": {"$ref": "#/$defs/lintFidelity"},
|
|
"limitations": {"type": "array", "items": {"type": "string"}}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"lintFindingCounts": {
|
|
"type": "object",
|
|
"required": ["errors", "warnings", "info", "total"],
|
|
"properties": {
|
|
"errors": {"type": "integer", "minimum": 0},
|
|
"warnings": {"type": "integer", "minimum": 0},
|
|
"info": {"type": "integer", "minimum": 0},
|
|
"total": {"type": "integer", "minimum": 0}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"findingCounts": {
|
|
"type": "object",
|
|
"required": ["critical", "high", "medium", "low", "total"],
|
|
"properties": {
|
|
"critical": {"type": "integer", "minimum": 0},
|
|
"high": {"type": "integer", "minimum": 0},
|
|
"medium": {"type": "integer", "minimum": 0},
|
|
"low": {"type": "integer", "minimum": 0},
|
|
"total": {"type": "integer", "minimum": 0}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"reviewSummary": {
|
|
"type": "object",
|
|
"required": ["artifact", "review_type", "verdict", "document_sha256", "input_sha256s", "finding_counts", "finding_ids"],
|
|
"properties": {
|
|
"artifact": {"enum": ["08_logic_review.json", "08_reader_review.json"]},
|
|
"review_type": {"enum": ["logic", "reader"]},
|
|
"verdict": {"enum": ["pass", "revise", "hold_for_review"]},
|
|
"document_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
|
"input_sha256s": {"$ref": "#/$defs/reviewInputs"},
|
|
"finding_counts": {"$ref": "#/$defs/findingCounts"},
|
|
"finding_ids": {"type": "array", "items": {"type": "string", "minLength": 1}, "uniqueItems": true}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"reviewInputs": {
|
|
"type": "object",
|
|
"required": ["input_sha256", "sources_sha256", "reader_contract_sha256", "evidence_map_sha256", "logic_map_sha256", "term_ledger_sha256"],
|
|
"properties": {
|
|
"input_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
|
"sources_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
|
"reader_contract_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
|
"evidence_map_sha256": {
|
|
"oneOf": [
|
|
{"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
|
{"type": "null"}
|
|
]
|
|
},
|
|
"logic_map_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
|
"term_ledger_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|