{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://mayvins.example/contracts/phase1-e2e/timetabler-evidence.schema.json",
  "title": "Timetabler Phase 1 E2E evidence",
  "type": "object",
  "required": [
    "schema_version",
    "service",
    "repository",
    "git_sha",
    "github_run_id",
    "run_id",
    "source_scope",
    "stage",
    "entry_watermark",
    "final_watermark",
    "fixture_ids",
    "evidence",
    "reverse_delivery_enabled",
    "load_executed",
    "dr_executed",
    "evidence_sha256"
  ],
  "properties": {
    "schema_version": {"const": 1},
    "service": {"const": "timetabler"},
    "repository": {"const": "Mayvins/timetabler-be"},
    "git_sha": {"type": "string", "pattern": "^[0-9a-f]{40}$"},
    "github_run_id": {"type": "string", "pattern": "^[0-9]+$"},
    "run_id": {
      "type": "string",
      "pattern": "^phase1-e2e-[a-z0-9][a-z0-9-]{5,80}$"
    },
    "source_scope": {"type": "string", "minLength": 1, "maxLength": 128},
    "stage": {
      "enum": ["functional", "redelivery", "conflict", "cleanup", "final"]
    },
    "entry_watermark": {"type": "integer", "minimum": 1},
    "final_watermark": {"type": "integer", "minimum": 1},
    "fixture_ids": {"type": "object"},
    "evidence": {"type": "array", "items": {"type": "object"}},
    "reverse_delivery_enabled": {"const": false},
    "load_executed": {"const": false},
    "dr_executed": {"const": false},
    "evidence_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}
  },
  "additionalProperties": false
}
