{
  "$id": "spec-kitty-events/diff_summary_recorded_payload",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Canonical git diff summary payload.",
  "properties": {
    "base_ref": {
      "description": "Diff base git ref or commit",
      "minLength": 1,
      "title": "Base Ref",
      "type": "string"
    },
    "files_changed": {
      "description": "Count of files changed in the diff",
      "minimum": 0,
      "title": "Files Changed",
      "type": "integer"
    },
    "head_ref": {
      "description": "Diff head git ref or commit",
      "minLength": 1,
      "title": "Head Ref",
      "type": "string"
    },
    "lines_added": {
      "description": "Lines added in the diff",
      "minimum": 0,
      "title": "Lines Added",
      "type": "integer"
    },
    "lines_deleted": {
      "description": "Lines deleted in the diff",
      "minimum": 0,
      "title": "Lines Deleted",
      "type": "integer"
    },
    "mission_id": {
      "description": "Canonical mission identifier",
      "minLength": 1,
      "title": "Mission Id",
      "type": "string"
    },
    "phase_name": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Mission phase name when known",
      "title": "Phase Name"
    },
    "run_id": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Mission run identifier when available",
      "title": "Run Id"
    },
    "source": {
      "description": "Diff summary source identifier",
      "minLength": 1,
      "title": "Source",
      "type": "string"
    },
    "step_id": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Mission step identifier when available",
      "title": "Step Id"
    },
    "wp_id": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Work-package identifier when available",
      "title": "Wp Id"
    }
  },
  "required": [
    "mission_id",
    "base_ref",
    "head_ref",
    "files_changed",
    "lines_added",
    "lines_deleted",
    "source"
  ],
  "title": "DiffSummaryRecordedPayload",
  "type": "object"
}
