| {
|
| "$schema": "https://json-schema.org/draft/2020-12/schema",
|
| "$id": "https://github.com/LucioLiu/handoff-protocol/contracts/parent-verification.schema.json",
|
| "title": "Parent verification trace",
|
| "type": "object",
|
| "additionalProperties": false,
|
| "required": [
|
| "handoff_id",
|
| "contract_id",
|
| "dispatch_id",
|
| "status",
|
| "authoritative_root",
|
| "checks"
|
| ],
|
| "properties": {
|
| "handoff_id": {"type": "string", "minLength": 1},
|
| "contract_id": {"type": "string", "minLength": 1},
|
| "dispatch_id": {"type": "string", "minLength": 1},
|
| "status": {"enum": ["pass", "fail"]},
|
| "authoritative_root": {
|
| "type": "object",
|
| "additionalProperties": false,
|
| "required": ["root_id", "resolved_path", "resolution_evidence"],
|
| "properties": {
|
| "root_id": {"type": "string", "minLength": 1},
|
| "resolved_path": {"type": "string", "minLength": 1},
|
| "resolution_evidence": {"type": "string", "minLength": 1}
|
| }
|
| },
|
| "checks": {
|
| "type": "array",
|
| "minItems": 4,
|
| "maxItems": 4,
|
| "uniqueItems": true,
|
| "items": {
|
| "type": "object",
|
| "additionalProperties": false,
|
| "required": ["target", "status", "evidence"],
|
| "properties": {
|
| "target": {
|
| "enum": ["employee_memory", "employee_worklog", "team_journal", "central_board"]
|
| },
|
| "status": {
|
| "enum": [
|
| "verified",
|
| "not_applicable",
|
| "missing",
|
| "wrong_root",
|
| "conflict",
|
| "provider_failed",
|
| "failed"
|
| ]
|
| },
|
| "path": {"type": "string", "minLength": 1},
|
| "evidence": {"type": "string", "minLength": 1}
|
| }
|
| }
|
| }
|
| },
|
| "allOf": [
|
| {
|
| "properties": {
|
| "checks": {
|
| "allOf": [
|
| {
|
| "contains": {
|
| "properties": {"target": {"const": "employee_memory"}},
|
| "required": ["target"]
|
| },
|
| "minContains": 1,
|
| "maxContains": 1
|
| },
|
| {
|
| "contains": {
|
| "properties": {"target": {"const": "employee_worklog"}},
|
| "required": ["target"]
|
| },
|
| "minContains": 1,
|
| "maxContains": 1
|
| },
|
| {
|
| "contains": {
|
| "properties": {"target": {"const": "team_journal"}},
|
| "required": ["target"]
|
| },
|
| "minContains": 1,
|
| "maxContains": 1
|
| },
|
| {
|
| "contains": {
|
| "properties": {"target": {"const": "central_board"}},
|
| "required": ["target"]
|
| },
|
| "minContains": 1,
|
| "maxContains": 1
|
| }
|
| ]
|
| }
|
| }
|
| },
|
| {
|
| "if": {
|
| "properties": {"status": {"const": "pass"}},
|
| "required": ["status"]
|
| },
|
| "then": {
|
| "properties": {
|
| "checks": {
|
| "items": {
|
| "properties": {
|
| "status": {"enum": ["verified", "not_applicable"]}
|
| }
|
| }
|
| }
|
| }
|
| }
|
| },
|
| {
|
| "if": {
|
| "properties": {"status": {"const": "fail"}},
|
| "required": ["status"]
|
| },
|
| "then": {
|
| "properties": {
|
| "checks": {
|
| "contains": {
|
| "properties": {
|
| "status": {
|
| "enum": [
|
| "missing",
|
| "wrong_root",
|
| "conflict",
|
| "provider_failed",
|
| "failed"
|
| ]
|
| }
|
| },
|
| "required": ["status"]
|
| },
|
| "minContains": 1
|
| }
|
| }
|
| }
|
| }
|
| ]
|
| }
|
|
|