{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://aihackers.net/lab-artifacts/toybox-clock/v2/EVALUATION.schema.json",
  "title": "Toybox Clock v2 evaluation",
  "type": "object",
  "required": ["schema_version", "evaluator", "input", "evaluated_at", "passed", "failures"],
  "properties": {
    "schema_version": { "const": 1 },
    "evaluator": { "const": "toybox-clock-v2" },
    "input": { "type": "string" },
    "locale": { "type": "string" },
    "timezone": { "type": ["string", "null"] },
    "evaluated_at": { "type": "string", "format": "date-time" },
    "ready": { "type": "boolean" },
    "samples": {
      "type": "object",
      "properties": {
        "first": { "$ref": "#/$defs/sample" },
        "second": { "$ref": "#/$defs/sample" }
      }
    },
    "observations": { "type": "object" },
    "gates": {
      "type": "object",
      "required": ["renders_without_console_error", "local_time_within_two_seconds", "advances_without_reload", "no_external_requests"],
      "additionalProperties": { "type": "boolean" }
    },
    "axe": { "type": "object" },
    "artifacts": { "type": "object" },
    "passed": { "type": "boolean" },
    "failures": { "type": "array", "items": { "type": "string" } },
    "page_errors": { "type": "array" },
    "error": { "type": "object" }
  },
  "$defs": {
    "sample": {
      "type": ["object", "null"],
      "properties": {
        "datetime": { "type": ["string", "null"] },
        "text": { "type": "string" },
        "sampledAt": { "type": "number" }
      }
    }
  },
  "additionalProperties": true
}
