{
  "$defs": {
    "ClosureObservation": {
      "additionalProperties": false,
      "properties": {
        "evidence_refs": {
          "items": {
            "type": "string"
          },
          "title": "Evidence Refs",
          "type": "array"
        },
        "limitations": {
          "items": {
            "type": "string"
          },
          "title": "Limitations",
          "type": "array"
        },
        "obligation_id": {
          "title": "Obligation Id",
          "type": "string"
        },
        "observed": {
          "title": "Observed",
          "type": "string"
        },
        "source_state_id": {
          "title": "Source State Id",
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/ObligationStatus"
        }
      },
      "required": [
        "obligation_id",
        "source_state_id",
        "status",
        "observed"
      ],
      "title": "ClosureObservation",
      "type": "object"
    },
    "ClosureOutcome": {
      "enum": [
        "closed",
        "discrepancy",
        "incomplete",
        "stale"
      ],
      "title": "ClosureOutcome",
      "type": "string"
    },
    "ObligationStatus": {
      "enum": [
        "satisfied",
        "discrepancy",
        "unresolved",
        "unavailable",
        "stale"
      ],
      "title": "ObligationStatus",
      "type": "string"
    }
  },
  "additionalProperties": false,
  "properties": {
    "after_provider_digests": {
      "additionalProperties": {
        "type": "string"
      },
      "title": "After Provider Digests",
      "type": "object"
    },
    "after_source_state_digest": {
      "pattern": "^sha256:[0-9a-f]{64}$",
      "title": "After Source State Digest",
      "type": "string"
    },
    "after_source_state_id": {
      "title": "After Source State Id",
      "type": "string"
    },
    "artifact_type": {
      "const": "anatomize.closure-report",
      "default": "anatomize.closure-report",
      "title": "Artifact Type",
      "type": "string"
    },
    "discrepancy_obligation_ids": {
      "items": {
        "type": "string"
      },
      "title": "Discrepancy Obligation Ids",
      "type": "array"
    },
    "intent_id": {
      "title": "Intent Id",
      "type": "string"
    },
    "limitations": {
      "items": {
        "type": "string"
      },
      "title": "Limitations",
      "type": "array"
    },
    "observations": {
      "items": {
        "$ref": "#/$defs/ClosureObservation"
      },
      "title": "Observations",
      "type": "array"
    },
    "outcome": {
      "$ref": "#/$defs/ClosureOutcome"
    },
    "provider_completeness": {
      "additionalProperties": {
        "enum": [
          "complete",
          "partial",
          "unavailable",
          "unknown"
        ],
        "type": "string"
      },
      "title": "Provider Completeness",
      "type": "object"
    },
    "report_id": {
      "title": "Report Id",
      "type": "string"
    },
    "repository_id": {
      "title": "Repository Id",
      "type": "string"
    },
    "schema_version": {
      "const": "1.0.0",
      "default": "1.0.0",
      "title": "Schema Version",
      "type": "string"
    },
    "unresolved_obligation_ids": {
      "items": {
        "type": "string"
      },
      "title": "Unresolved Obligation Ids",
      "type": "array"
    }
  },
  "required": [
    "report_id",
    "intent_id",
    "repository_id",
    "after_source_state_id",
    "after_source_state_digest",
    "after_provider_digests",
    "provider_completeness",
    "observations",
    "outcome",
    "discrepancy_obligation_ids",
    "unresolved_obligation_ids",
    "limitations"
  ],
  "title": "ClosureReport",
  "type": "object"
}
