{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.invalid/pixel-echo/mechanism-sample.schema.json",
  "title": "Pixel Echo mechanism sample",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version", "dataset_kind", "sample_id", "mechanism_id",
    "mechanism_group_id", "cohort_id", "cohort_role", "split", "task",
    "generator_id", "decoder_id", "checkpoint_identity", "condition_id",
    "native_resolution", "native_mime_type", "export_pipeline_id",
    "transformations", "label_visibility"
  ],
  "properties": {
    "schema_version": {"const": "mechanism_sample_v1"},
    "dataset_kind": {"const": "mechanism"},
    "sample_id": {"type": "string", "minLength": 1},
    "mechanism_id": {"enum": ["c2i_mechanism_1k", "t2i_mechanism_1k"]},
    "mechanism_group_id": {"type": "string", "minLength": 1},
    "cohort_id": {"type": "string", "minLength": 1},
    "cohort_role": {"enum": ["REAL", "RECON", "GEN"]},
    "split": {"const": "mechanism"},
    "task": {"enum": ["C2I", "T2I"]},
    "generator_id": {"type": ["string", "null"]},
    "decoder_id": {"type": ["string", "null"]},
    "checkpoint_identity": {"type": ["string", "null"]},
    "condition_id": {"type": "string", "minLength": 1},
    "prompt_id": {"type": ["string", "null"]},
    "class_id": {"type": ["string", "integer", "null"]},
    "source_image_id": {"type": ["string", "null"]},
    "asset_path": {"type": "string", "minLength": 1},
    "seed": {"type": ["integer", "string", "null"]},
    "request_id": {"type": ["string", "null"]},
    "native_resolution": {
      "type": "object", "additionalProperties": false,
      "required": ["width", "height"],
      "properties": {"width": {"type": "integer", "minimum": 1}, "height": {"type": "integer", "minimum": 1}}
    },
    "native_mime_type": {"enum": ["image/png", "image/jpeg", "image/webp", "image/avif", "unknown"]},
    "export_pipeline_id": {"type": "string", "minLength": 1},
    "transformations": {"type": "array", "items": {"type": "object"}},
    "label_visibility": {"const": "public_mechanism_metadata"},
    "input_track": {"enum": ["canonical_png", "native"]},
    "track_policy_id": {"type": "string", "minLength": 1},
    "dry_run_transform": {"type": "object"},
    "provenance_reference": {"type": ["string", "null"]},
    "notes": {"type": "string"}
  }
}
