{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "anu_v3/schemas/parallel_runtime_registry.schema.json",
  "title": "anu_v3.parallel_runtime_registry.v1",
  "description": "Authority batch-state file emitted by the +29 runtime registry. Standalone — NOT the frozen anu_v3.parallel_batch_state.v1 durable file (separate path, zero coupling).",
  "type": "object",
  "required": [
    "schema",
    "batch_id",
    "source_fixture",
    "frozen_batch_state_ref",
    "tracks",
    "batch_next_action",
    "closeout_proposal",
    "consolidated_summary"
  ],
  "properties": {
    "schema": { "type": "string", "const": "anu_v3.parallel_runtime_registry.v1" },
    "batch_id": { "type": "string" },
    "source_fixture": { "type": "string" },
    "source_fixture_sha256": { "type": "string" },
    "frozen_batch_state_ref": { "type": "string" },
    "generated_ts_kst": { "type": "string" },
    "tracks": {
      "type": "object",
      "additionalProperties": {
        "$ref": "task_runtime_record.schema.json"
      }
    },
    "join_policy": {
      "type": "object",
      "properties": {
        "independent_done_tracks": { "type": "array", "items": { "type": "string" } },
        "held_tracks": { "type": "array", "items": { "type": "string" } },
        "blocking_relations": { "type": "array" }
      }
    },
    "missing_normal_collector": { "type": "array", "items": { "type": "string" } },
    "contamination": { "type": "array" },
    "batch_next_action": {
      "type": "string",
      "enum": ["BATCH_ACCEPT", "BATCH_HOLD", "CONTINUE_LOOP", "WAIT_FOR_FALLBACK"]
    },
    "closeout_proposal": {
      "type": "object",
      "required": ["eligible", "derived_from", "confirmed"],
      "properties": {
        "eligible": { "type": "boolean" },
        "derived_from": { "type": "string", "const": "batch_state" },
        "confirmed": { "type": "boolean", "const": false },
        "reason": { "type": "string" }
      }
    },
    "consolidated_summary": {
      "type": "object",
      "description": "Final decision fields only — no narrative/substance/next_action prose.",
      "required": ["tracks", "batch_next_action", "closeout_eligible"],
      "properties": {
        "tracks": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "required": ["terminal_outcome", "classification", "hold_for_chair"],
            "properties": {
              "terminal_outcome": { "type": "string" },
              "classification": { "type": "string" },
              "hold_for_chair": { "type": "boolean" }
            },
            "additionalProperties": false
          }
        },
        "batch_next_action": { "type": "string" },
        "closeout_eligible": { "type": "boolean" }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": true
}
