{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "anu_v3/track_result.schema.json",
  "title": "Track Result (task-2553+17 Track2)",
  "description": "Per-track result/final-authority packet consumed by final_authority_packet_selector. source=normal|fallback drives the 9-R.6 deterministic tie-breaker (normal > fallback, then latest ts).",
  "type": "object",
  "required": ["task_id", "track_id", "source", "schema", "ts", "path"],
  "additionalProperties": true,
  "properties": {
    "task_id": { "type": "string", "minLength": 1 },
    "track_id": { "type": "string", "minLength": 1 },
    "source": { "type": "string", "enum": ["normal", "fallback"] },
    "schema": {
      "type": "string",
      "description": "anu_*_result / *final_packet schema id"
    },
    "ts": {
      "type": "string",
      "description": "ISO8601 sortable timestamp (tie-breaker after source)"
    },
    "path": { "type": "string", "minLength": 1 },
    "status": { "type": "string" },
    "callback_class": {
      "type": "string",
      "enum": [
        "NORMAL_COLLECTOR_ACCEPTED",
        "DUPLICATE_CALLBACK_IGNORED",
        "CALLBACK_PENDING",
        "TRACK_MISMATCH",
        "CONTAMINATION_HOLD"
      ]
    }
  }
}
