{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/exactlane-dev/json-schema/exactlane-dev-revision-check-create-schema.json",
  "title": "RevisionCheckCreate",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/exactlane-dev-api-openapi.json#/components/schemas/RevisionCheckCreate",
  "additionalProperties": false,
  "properties": {
    "capability_key": {
      "maxLength": 128,
      "minLength": 1,
      "type": "string"
    },
    "previous": {
      "$ref": "#/$defs/RevisionCheckPrevious"
    },
    "profile": {
      "$ref": "#/$defs/ProfileRef"
    },
    "requirements": {
      "$ref": "#/$defs/SupportedConsumerRequirements"
    },
    "revision_label": {
      "maxLength": 128,
      "minLength": 1,
      "type": "string"
    },
    "snapshot": {
      "$ref": "#/$defs/CapabilitySnapshot"
    },
    "source_kind": {
      "const": "CALLER_PROVIDED"
    }
  },
  "required": [
    "capability_key",
    "revision_label",
    "source_kind",
    "profile",
    "requirements",
    "snapshot",
    "previous"
  ],
  "type": "object",
  "$defs": {
    "ArrayItemSchemaRequirement": {
      "additionalProperties": false,
      "description": "Caller-specific requirement over every explicit type=array node in one bounded tool schema location",
      "properties": {
        "applies_when_modes": {
          "items": {
            "$ref": "#/$defs/CallerProfileMode"
          },
          "maxItems": 8,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        },
        "schema_location": {
          "enum": [
            "input",
            "output"
          ],
          "type": "string"
        }
      },
      "required": [
        "schema_location"
      ],
      "type": "object"
    },
    "CallerProfileMode": {
      "description": "Opaque caller profile mode used only for exact, case-sensitive GAP-03 applicability",
      "maxLength": 64,
      "minLength": 1,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$",
      "type": "string"
    },
    "CapabilitySnapshot": {
      "additionalProperties": false,
      "properties": {
        "captured_at": {
          "format": "date-time",
          "type": "string"
        },
        "protocol": {
          "additionalProperties": false,
          "properties": {
            "name": {
              "maxLength": 64,
              "type": "string"
            },
            "revision": {
              "maxLength": 64,
              "type": "string"
            },
            "transport": {
              "maxLength": 64,
              "type": "string"
            }
          },
          "type": "object"
        },
        "schema_version": {
          "maxLength": 80,
          "type": "string"
        },
        "tools": {
          "items": {
            "$ref": "#/$defs/CapabilityTool"
          },
          "maxItems": 10,
          "type": "array"
        }
      },
      "type": "object"
    },
    "CapabilityTool": {
      "additionalProperties": false,
      "properties": {
        "_meta": {
          "description": "Accepted for tools/list compatibility and discarded before storage, digest and evaluation",
          "type": "object"
        },
        "annotations": {
          "description": "Accepted for tools/list compatibility and discarded before storage, digest and evaluation",
          "type": "object"
        },
        "description": {
          "description": "Accepted for tools/list compatibility and discarded before storage, digest and evaluation",
          "type": "string"
        },
        "icons": {
          "description": "Accepted for tools/list compatibility and discarded before storage, digest and evaluation",
          "type": "array"
        },
        "inputSchema": {
          "$ref": "#/$defs/JsonSchemaObject"
        },
        "max_input_bytes": {
          "maximum": 262144,
          "minimum": 1,
          "type": "integer"
        },
        "name": {
          "maxLength": 128,
          "minLength": 1,
          "type": "string"
        },
        "outputSchema": {
          "$ref": "#/$defs/JsonSchemaObject"
        },
        "title": {
          "description": "Accepted for tools/list compatibility and discarded before storage, digest and evaluation",
          "maxLength": 256,
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "CheckReport": {
      "properties": {
        "checks": {
          "items": {
            "$ref": "#/$defs/CheckResult"
          },
          "type": "array"
        },
        "coverage": {
          "$ref": "#/$defs/Coverage"
        },
        "evaluated_at": {
          "format": "date-time",
          "type": "string"
        },
        "lifecycle": {
          "enum": [
            "QUEUED",
            "RUNNING",
            "FINISHED",
            "CANCELLED"
          ],
          "type": "string"
        },
        "limitations": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "profile": {
          "type": "object"
        },
        "requirements_digest": {
          "type": "string"
        },
        "revision_changes": {
          "type": "object"
        },
        "run_id": {
          "type": "string"
        },
        "runner": {
          "type": "object"
        },
        "schema_version": {
          "const": "exactlane.check-report/0.1"
        },
        "source": {
          "properties": {
            "captured_at": {
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "kind": {
              "const": "CALLER_PROVIDED"
            },
            "live_endpoint_observed": {
              "const": false
            },
            "observed_at": {
              "type": "null"
            }
          },
          "required": [
            "kind",
            "live_endpoint_observed"
          ],
          "type": "object"
        },
        "subject": {
          "type": "object"
        },
        "trust": {
          "type": "object"
        },
        "verdict": {
          "description": "Finished-report aggregation precedence: any ERROR produces SYSTEM_ERROR; otherwise any FAIL produces FAIL; otherwise any UNSUPPORTED produces UNSUPPORTED; otherwise any NOT_RUN produces INCOMPLETE; otherwise the verdict is PASS. Report-level UNSUPPORTED and SYSTEM_ERROR are finished-report outcomes, not HTTP error responses.",
          "enum": [
            "PASS",
            "FAIL",
            "INCOMPLETE",
            "UNSUPPORTED",
            "SYSTEM_ERROR",
            null
          ],
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "schema_version",
        "run_id",
        "lifecycle",
        "verdict",
        "subject",
        "profile",
        "runner",
        "requirements_digest",
        "source",
        "coverage",
        "checks",
        "revision_changes",
        "trust",
        "evaluated_at",
        "limitations"
      ],
      "type": "object"
    },
    "CheckResult": {
      "properties": {
        "check_id": {
          "type": "string"
        },
        "evidence_path": {
          "type": "string"
        },
        "expected": {},
        "observed": {},
        "reason": {
          "type": "string"
        },
        "result": {
          "description": "Per-check evidence result. PASS: the condition was evaluated with supported semantics and the caller's requirement was met. FAIL: the evaluator proved a concrete incompatibility with the caller's requirement. NOT_RUN: the check did not execute because evidence was missing or stale, or because a prerequisite check could not run. UNSUPPORTED: the condition depends on semantics outside the fixed evaluator profile; this is neither proof of compatibility nor incompatibility. ERROR: a bounded internal runner, artifact, or report condition was represented as a check result.",
          "enum": [
            "PASS",
            "FAIL",
            "NOT_RUN",
            "UNSUPPORTED",
            "ERROR"
          ],
          "type": "string"
        }
      },
      "required": [
        "check_id",
        "result"
      ],
      "type": "object"
    },
    "ConsumerRequirements": {
      "additionalProperties": false,
      "properties": {
        "exposed_tool_identifier": {
          "$ref": "#/$defs/ExposedToolIdentifierRule"
        },
        "max_snapshot_age_seconds": {
          "maximum": 2592000,
          "minimum": 1,
          "type": "integer"
        },
        "protocol_revision": {
          "maxLength": 64,
          "type": "string"
        },
        "required_tools": {
          "items": {
            "$ref": "#/$defs/ToolRequirement"
          },
          "maxItems": 10,
          "minItems": 1,
          "type": "array"
        },
        "schema_version": {
          "const": "exactlane.consumer-requirements/0.1"
        },
        "transport": {
          "maxLength": 64,
          "type": "string"
        }
      },
      "required": [
        "schema_version",
        "protocol_revision",
        "transport",
        "required_tools"
      ],
      "type": "object"
    },
    "ConsumerRequirementsV02": {
      "additionalProperties": false,
      "properties": {
        "caller_profile_mode": {
          "$ref": "#/$defs/CallerProfileMode"
        },
        "exposed_tool_identifier": {
          "$ref": "#/$defs/ExposedToolIdentifierRule"
        },
        "max_snapshot_age_seconds": {
          "maximum": 2592000,
          "minimum": 1,
          "type": "integer"
        },
        "protocol_revision": {
          "maxLength": 64,
          "type": "string"
        },
        "required_tools": {
          "items": {
            "$ref": "#/$defs/ToolRequirementV02"
          },
          "maxItems": 10,
          "minItems": 1,
          "type": "array"
        },
        "schema_version": {
          "description": "Requirements 0.2 select profile 0.2 and 0.3 select profile 0.3; the fields are the same",
          "enum": [
            "exactlane.consumer-requirements/0.2",
            "exactlane.consumer-requirements/0.3"
          ]
        },
        "transport": {
          "maxLength": 64,
          "type": "string"
        }
      },
      "required": [
        "schema_version",
        "protocol_revision",
        "transport",
        "required_tools"
      ],
      "type": "object"
    },
    "Coverage": {
      "additionalProperties": false,
      "properties": {
        "errors": {
          "minimum": 0,
          "type": "integer"
        },
        "executed": {
          "minimum": 0,
          "type": "integer"
        },
        "failed": {
          "minimum": 0,
          "type": "integer"
        },
        "not_run": {
          "minimum": 0,
          "type": "integer"
        },
        "passed": {
          "minimum": 0,
          "type": "integer"
        },
        "required": {
          "minimum": 0,
          "type": "integer"
        },
        "unsupported": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "required",
        "executed",
        "passed",
        "failed",
        "not_run",
        "unsupported",
        "errors"
      ],
      "type": "object"
    },
    "ExposedToolIdentifierRule": {
      "additionalProperties": false,
      "description": "For each required tool, compare len(server_identifier + separator + tool.name) with max_characters; all parts are visible ASCII",
      "properties": {
        "max_characters": {
          "maximum": 264,
          "minimum": 1,
          "type": "integer"
        },
        "separator": {
          "maxLength": 8,
          "minLength": 1,
          "pattern": "^[!-~]+$",
          "type": "string"
        },
        "server_identifier": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[!-~]+$",
          "type": "string"
        }
      },
      "required": [
        "server_identifier",
        "separator",
        "max_characters"
      ],
      "type": "object"
    },
    "JsonSchemaObject": {
      "description": "JSON Schema object; the fixed profile supports only its documented keyword subset",
      "type": "object"
    },
    "ProfileRef": {
      "additionalProperties": false,
      "properties": {
        "id": {
          "const": "mcp-consumer-fit"
        },
        "version": {
          "enum": [
            "0.1",
            "0.2",
            "0.3"
          ],
          "type": "string"
        }
      },
      "required": [
        "id",
        "version"
      ],
      "type": "object"
    },
    "RevisionCheckPrevious": {
      "additionalProperties": false,
      "properties": {
        "report": {
          "$ref": "#/$defs/CheckReport",
          "description": "The finished check report for previous.snapshot, at most 16 KiB. It is re-evaluated, never trusted; it must use the same requirements, profile and capability_key."
        },
        "revision_receipt": {
          "$ref": "#/$defs/RevisionReceipt",
          "description": "Optional previous revision receipt whose current.report_digest names previous.report."
        },
        "snapshot": {
          "$ref": "#/$defs/CapabilitySnapshot",
          "description": "The caller-provided snapshot that previous.report evaluated; its digest must match."
        }
      },
      "required": [
        "snapshot",
        "report"
      ],
      "type": "object"
    },
    "RevisionReceipt": {
      "description": "Revision analysis beside an unchanged check report. The global previous-to-current comparison is authoritative. Isolated change evaluations report DIRECT_EFFECT_OBSERVED, NO_ISOLATED_EFFECT_OBSERVED or NOT_EVALUATED and cannot rule out interaction effects.",
      "properties": {
        "analysis": {
          "type": "object"
        },
        "baseline": {
          "properties": {
            "status": {
              "enum": [
                "REEVALUATION_MATCHED",
                "REEVALUATION_MISMATCH",
                "EVALUATOR_CHANGED",
                "NOT_AVAILABLE"
              ]
            }
          },
          "type": "object"
        },
        "caller_owns_operational_decision": {
          "const": true
        },
        "changes": {
          "properties": {
            "items": {
              "items": {
                "properties": {
                  "isolated": {
                    "enum": [
                      "DIRECT_EFFECT_OBSERVED",
                      "NO_ISOLATED_EFFECT_OBSERVED",
                      "NOT_EVALUATED"
                    ]
                  },
                  "scope": {
                    "enum": [
                      "SNAPSHOT",
                      "PROTOCOL",
                      "REQUIRED_TOOL",
                      "UNREQUIRED_TOOL"
                    ]
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "core_digest": {
          "type": "string"
        },
        "current": {
          "type": "object"
        },
        "explanation": {
          "items": {
            "type": "object"
          },
          "type": "array"
        },
        "global": {
          "properties": {
            "conclusion_transition": {
              "enum": [
                "STILL_PASS",
                "NO_LONGER_PASS",
                "NOW_PASS",
                "STILL_NON_PASS_SAME_FINDINGS",
                "STILL_NON_PASS_FINDINGS_CHANGED"
              ]
            },
            "previous_conclusion_holds": {
              "type": "boolean"
            },
            "status": {
              "enum": [
                "COMPLETE",
                "INCOMPLETE",
                "NOT_AVAILABLE"
              ]
            },
            "transitions": {
              "items": {
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "limitations": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "per_change_analysis": {
          "properties": {
            "interaction_effects": {
              "enum": [
                "INTERACTION_EFFECT_POSSIBLE",
                "SINGLE_CHANGE",
                "NO_CHANGES"
              ]
            },
            "limit": {
              "const": 32
            },
            "status": {
              "enum": [
                "COMPLETE",
                "INCOMPLETE",
                "NOT_APPLICABLE",
                "NOT_AVAILABLE"
              ]
            }
          },
          "type": "object"
        },
        "previous": {
          "type": "object"
        },
        "receipt_digest": {
          "type": "string"
        },
        "schema_version": {
          "const": "exactlane.revision-receipt/0.1"
        },
        "source": {
          "type": "object"
        },
        "subject": {
          "type": "object"
        }
      },
      "required": [
        "schema_version",
        "analysis",
        "subject",
        "previous",
        "current",
        "baseline",
        "global",
        "changes",
        "per_change_analysis",
        "explanation",
        "caller_owns_operational_decision",
        "source",
        "limitations",
        "core_digest",
        "receipt_digest"
      ],
      "type": "object"
    },
    "SchemaDialectIdentifier": {
      "description": "Absolute visible-ASCII URI compared by exact string equality",
      "maxLength": 256,
      "minLength": 3,
      "pattern": "^[A-Za-z][A-Za-z0-9+.-]*:[!-~]+$",
      "type": "string"
    },
    "SupportedConsumerRequirements": {
      "description": "Profile 0.1 uses requirements 0.1, profile 0.2 uses requirements 0.2 and profile 0.3 uses requirements 0.3. Profile 0.3 also accepts JSON Schema annotation keywords in tool schemas.",
      "oneOf": [
        {
          "$ref": "#/$defs/ConsumerRequirements"
        },
        {
          "$ref": "#/$defs/ConsumerRequirementsV02"
        }
      ]
    },
    "ToolRequirement": {
      "additionalProperties": false,
      "properties": {
        "estimated_input_bytes": {
          "maximum": 262144,
          "minimum": 0,
          "type": "integer"
        },
        "name": {
          "maxLength": 128,
          "minLength": 1,
          "type": "string"
        },
        "provided_input_fields": {
          "additionalProperties": {
            "enum": [
              "string",
              "number",
              "integer",
              "boolean",
              "array",
              "object",
              "null"
            ],
            "type": "string"
          },
          "maxProperties": 30,
          "type": "object"
        },
        "required_input_schema_dialect": {
          "$ref": "#/$defs/SchemaDialectIdentifier"
        },
        "required_output_paths": {
          "additionalProperties": {
            "enum": [
              "string",
              "number",
              "integer",
              "boolean",
              "array",
              "object",
              "null"
            ],
            "type": "string"
          },
          "maxProperties": 30,
          "type": "object"
        },
        "required_output_schema_dialect": {
          "$ref": "#/$defs/SchemaDialectIdentifier"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "ToolRequirementV02": {
      "additionalProperties": false,
      "properties": {
        "array_item_schema_requirements": {
          "description": "At most one input rule and one output rule; duplicate locations are rejected",
          "items": {
            "$ref": "#/$defs/ArrayItemSchemaRequirement"
          },
          "maxItems": 2,
          "minItems": 1,
          "type": "array"
        },
        "estimated_input_bytes": {
          "maximum": 262144,
          "minimum": 0,
          "type": "integer"
        },
        "name": {
          "maxLength": 128,
          "minLength": 1,
          "type": "string"
        },
        "provided_input_fields": {
          "additionalProperties": {
            "enum": [
              "string",
              "number",
              "integer",
              "boolean",
              "array",
              "object",
              "null"
            ],
            "type": "string"
          },
          "maxProperties": 30,
          "type": "object"
        },
        "required_input_schema_dialect": {
          "$ref": "#/$defs/SchemaDialectIdentifier"
        },
        "required_output_paths": {
          "additionalProperties": {
            "enum": [
              "string",
              "number",
              "integer",
              "boolean",
              "array",
              "object",
              "null"
            ],
            "type": "string"
          },
          "maxProperties": 30,
          "type": "object"
        },
        "required_output_schema_dialect": {
          "$ref": "#/$defs/SchemaDialectIdentifier"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    }
  }
}