{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "anu_v3/parallel_batch_plan.schema.json",
  "title": "Parallel Batch Plan (task-2553+17 Track2)",
  "description": "Input plan for ParallelBatchCoordinator. Authority: task-2553+17.md §2/§3/§4. callback identity fields align to 9-R.2 single definition.",
  "type": "object",
  "required": ["batch_label", "tracks"],
  "additionalProperties": false,
  "properties": {
    "batch_label": { "type": "string", "minLength": 1 },
    "tracks": {
      "type": "array",
      "minItems": 1,
      "items": { "$ref": "#/definitions/track_plan" }
    },
    "goal_requests": {
      "type": "array",
      "items": { "$ref": "#/definitions/goal_request_ref" }
    }
  },
  "definitions": {
    "track_plan": {
      "type": "object",
      "required": [
        "track_id",
        "task_id",
        "dispatch_cron_id",
        "normal_collector_cron_id",
        "fallback_callback_cron_id"
      ],
      "additionalProperties": false,
      "properties": {
        "track_id": { "type": "string", "minLength": 1 },
        "task_id": { "type": "string", "minLength": 1 },
        "dispatch_cron_id": { "type": "string", "minLength": 1 },
        "normal_collector_cron_id": { "type": "string", "minLength": 1 },
        "fallback_callback_cron_id": { "type": "string", "minLength": 1 },
        "expected_files": { "type": "array", "items": { "type": "string" } },
        "forbidden_write_targets": {
          "type": "array",
          "items": { "type": "string" }
        },
        "depends_on": { "type": "array", "items": { "type": "string" } },
        "own_artifacts": { "type": "array", "items": { "type": "string" } },
        "cited_artifacts": { "type": "array", "items": { "type": "string" } },
        "initial_state": { "type": "string" },
        "retry_ceiling": { "type": "integer", "minimum": 0 }
      }
    },
    "goal_request_ref": {
      "type": "object",
      "required": ["goal_id"],
      "properties": {
        "goal_id": { "type": "string", "minLength": 1 }
      }
    }
  }
}
