{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://hogarmas.net/content-credentials/reproduction-schema.json",
  "title": "H/M Content Credentials evidence reproduction result",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema", "ruleset", "state", "envelope", "sourceBytes", "evidence", "privacy", "limitations"],
  "properties": {
    "schema": { "const": "hm.content-credentials-reproduction.v1" },
    "ruleset": { "enum": ["2026-07-22.3", "2026-07-28.1"] },
    "state": { "enum": ["reproduced", "changed", "indeterminate"] },
    "envelope": {
      "type": "object",
      "additionalProperties": false,
      "required": ["state", "code", "expectedDigest", "actualDigest", "cryptographicallySigned", "issuerIdentityVerified"],
      "properties": {
        "state": { "enum": ["match", "mismatch", "invalid"] },
        "code": { "type": "string", "maxLength": 40 },
        "expectedDigest": { "type": "string", "maxLength": 71 },
        "actualDigest": { "type": "string", "maxLength": 71 },
        "cryptographicallySigned": { "const": false },
        "issuerIdentityVerified": { "const": false }
      }
    },
    "sourceBytes": {
      "type": "object",
      "additionalProperties": false,
      "required": ["state", "exportedSha256", "currentSha256"],
      "properties": {
        "state": { "enum": ["match", "mismatch", "unknown"] },
        "exportedSha256": { "type": "string", "maxLength": 80 },
        "currentSha256": { "type": "string", "maxLength": 80 }
      }
    },
    "evidence": {
      "type": "object",
      "additionalProperties": false,
      "required": ["state", "changedObservationCount", "comparison"],
      "properties": {
        "state": { "enum": ["match", "changed"] },
        "changedObservationCount": { "type": "integer", "minimum": 0 },
        "comparison": { "$ref": "https://hogarmas.net/content-credentials/comparison-schema.json" }
      }
    },
    "privacy": {
      "type": "object",
      "additionalProperties": false,
      "required": ["processedLocally", "sourceFileUploaded", "browserStorageUsed", "exportedFileNamesIncluded", "exportedHashesIncluded", "sourceFileBytesIncluded"],
      "properties": {
        "processedLocally": { "const": true },
        "sourceFileUploaded": { "const": false },
        "browserStorageUsed": { "const": false },
        "exportedFileNamesIncluded": { "const": true },
        "exportedHashesIncluded": { "const": true },
        "sourceFileBytesIncluded": { "const": false }
      }
    },
    "limitations": {
      "type": "object",
      "additionalProperties": false,
      "required": ["checksumAuthenticatesIssuer", "reproductionAuthenticatesAuthor", "semanticTruthProven", "aiAbsenceProven", "legalComplianceCertified"],
      "properties": {
        "checksumAuthenticatesIssuer": { "const": false },
        "reproductionAuthenticatesAuthor": { "const": false },
        "semanticTruthProven": { "const": false },
        "aiAbsenceProven": { "const": false },
        "legalComplianceCertified": { "const": false }
      }
    }
  }
}
