{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "recordType",
    "candidateId",
    "sourceCommit",
    "gitTree",
    "scopeSha256",
    "chain",
    "testId",
    "methodId",
    "startedAtUtc",
    "endedAtUtc",
    "sampleCount",
    "challengePairs",
    "falseLinks",
    "executionOutputPath",
    "executionOutputSha256",
    "events"
  ],
  "properties": {
    "schemaVersion": {
      "const": "1.0.0"
    },
    "recordType": {
      "const": "privacy-unlinkability-transcript"
    },
    "candidateId": {
      "type": "string",
      "pattern": "^sha256:[0-9a-f]{64}$"
    },
    "sourceCommit": {
      "type": "string",
      "pattern": "^[0-9a-f]{40}$"
    },
    "gitTree": {
      "type": "string",
      "pattern": "^[0-9a-f]{40}$"
    },
    "scopeSha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "chain": {
      "const": "base"
    },
    "testId": {
      "enum": [
        "privacy.commitment-reuse",
        "privacy.cross-partner-collusion",
        "privacy.metadata-timing-correlation",
        "privacy.combined"
      ]
    },
    "methodId": {
      "const": "statistical-linkage-challenge-v1"
    },
    "startedAtUtc": {
      "type": "string",
      "format": "date-time"
    },
    "endedAtUtc": {
      "type": "string",
      "format": "date-time"
    },
    "sampleCount": {
      "type": "integer",
      "minimum": 100
    },
    "challengePairs": {
      "type": "integer",
      "minimum": 100
    },
    "falseLinks": {
      "type": "integer",
      "minimum": 0
    },
    "executionOutputPath": {
      "type": "string",
      "pattern": "^pr10/partner-package/evidence/organizational/privacy-outputs/[a-z0-9-]+\\.json$"
    },
    "executionOutputSha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "events": {
      "type": "array",
      "minItems": 100,
      "uniqueItems": true,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "pairId",
          "expectedRelationship",
          "observedRelationship",
          "leftInputSha256",
          "rightInputSha256",
          "runnerOutputSha256",
          "leftCandidateOutputSha256",
          "rightCandidateOutputSha256"
        ],
        "properties": {
          "pairId": {
            "type": "string",
            "pattern": "^pair:[0-9a-f]{64}$"
          },
          "expectedRelationship": {
            "enum": [
              "linked",
              "unlinked"
            ]
          },
          "observedRelationship": {
            "enum": [
              "linked",
              "unlinked"
            ]
          },
          "leftInputSha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "rightInputSha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "runnerOutputSha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "leftCandidateOutputSha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "rightCandidateOutputSha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        }
      }
    }
  }
}
