{
  "$comment": "Generated from the Buildish Release Tooling Pydantic models. Do not edit by hand; regenerate with `make schemas`.",
  "$defs": {
    "ArtifactReproducibilityBuildOverrideReport": {
      "additionalProperties": false,
      "description": "Sparse local override delta applied to one canonical build recipe.",
      "properties": {
        "command": {
          "anyOf": [
            {
              "items": {
                "minLength": 1,
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Literal argv list that Buildish executed or recommends for the related step.",
          "title": "Command"
        },
        "env_keys": {
          "description": "Environment variable names referenced by the related recipe or override without exposing their values.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Env Keys",
          "type": "array"
        },
        "output_globs": {
          "anyOf": [
            {
              "items": {
                "minLength": 1,
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Repository-root-relative glob patterns that identify expected outputs of the related build recipe.",
          "title": "Output Globs"
        },
        "working_directory": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Repository-root-relative working directory that Buildish recorded in the related canonical recipe, effective execution, or local override block.",
          "title": "Working Directory"
        }
      },
      "title": "ArtifactReproducibilityBuildOverrideReport",
      "type": "object",
      "x-buildish-contract": {
        "category": "emitted",
        "ownership": "tooling-derived"
      }
    },
    "ArtifactReproducibilityCanonicalBuildRecipeReport": {
      "additionalProperties": false,
      "description": "Canonical build recipe declared by the verified source tree for one profile.",
      "properties": {
        "command": {
          "description": "Literal argv list that Buildish executed or recommends for the related step.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Command",
          "type": "array"
        },
        "env_keys": {
          "description": "Environment variable names referenced by the related recipe or override without exposing their values.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Env Keys",
          "type": "array"
        },
        "output_globs": {
          "description": "Repository-root-relative glob patterns that identify expected outputs of the related build recipe.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Output Globs",
          "type": "array"
        },
        "working_directory": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Repository-root-relative working directory that Buildish recorded in the related canonical recipe, effective execution, or local override block.",
          "title": "Working Directory"
        }
      },
      "title": "ArtifactReproducibilityCanonicalBuildRecipeReport",
      "type": "object",
      "x-buildish-contract": {
        "category": "emitted",
        "ownership": "tooling-derived"
      }
    },
    "ArtifactReproducibilityCanonicalRecipeReport": {
      "additionalProperties": false,
      "description": "Canonical repo-defined recipe for one reproducibility profile.",
      "properties": {
        "build": {
          "$ref": "#/$defs/ArtifactReproducibilityCanonicalBuildRecipeReport",
          "description": "Nested build recipe or effective build execution block for one reproducibility contract."
        }
      },
      "required": [
        "build"
      ],
      "title": "ArtifactReproducibilityCanonicalRecipeReport",
      "type": "object",
      "x-buildish-contract": {
        "category": "emitted",
        "ownership": "tooling-derived"
      }
    },
    "ArtifactReproducibilityEffectiveBuildExecutionReport": {
      "additionalProperties": false,
      "description": "Observed build invocation details for one executed reproducibility profile.",
      "properties": {
        "command": {
          "description": "Literal argv list that Buildish executed or recommends for the related step.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Command",
          "type": "array"
        },
        "injected_environment_keys": {
          "description": "Environment variable names that Buildish injected into the effective rebuild subprocess.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Injected Environment Keys",
          "type": "array"
        },
        "output_paths": {
          "description": "Concrete output paths that Buildish observed from the effective rebuild execution.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Output Paths",
          "type": "array"
        },
        "working_directory": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Repository-root-relative working directory that Buildish recorded in the related canonical recipe, effective execution, or local override block.",
          "title": "Working Directory"
        }
      },
      "title": "ArtifactReproducibilityEffectiveBuildExecutionReport",
      "type": "object",
      "x-buildish-contract": {
        "category": "emitted",
        "ownership": "tooling-derived"
      }
    },
    "ArtifactReproducibilityEffectiveExecutionReport": {
      "additionalProperties": false,
      "description": "Effective execution details for one reproducibility run.",
      "properties": {
        "backend": {
          "const": "host-direct",
          "default": "host-direct",
          "description": "Execution backend name that performed the related Buildish action or reproducibility run.",
          "title": "Backend",
          "type": "string"
        },
        "build": {
          "$ref": "#/$defs/ArtifactReproducibilityEffectiveBuildExecutionReport",
          "description": "Nested build recipe or effective build execution block for one reproducibility contract."
        }
      },
      "required": [
        "build"
      ],
      "title": "ArtifactReproducibilityEffectiveExecutionReport",
      "type": "object",
      "x-buildish-contract": {
        "category": "emitted",
        "ownership": "tooling-derived"
      }
    },
    "ArtifactReproducibilityOverrideReport": {
      "additionalProperties": false,
      "description": "Structured local override metadata for one reproducibility run.",
      "properties": {
        "applied": {
          "default": false,
          "description": "Whether the related local override block was applied to the effective rebuild execution.",
          "title": "Applied",
          "type": "boolean"
        },
        "build": {
          "anyOf": [
            {
              "$ref": "#/$defs/ArtifactReproducibilityBuildOverrideReport"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Nested build recipe or effective build execution block for one reproducibility contract."
        }
      },
      "title": "ArtifactReproducibilityOverrideReport",
      "type": "object",
      "x-buildish-contract": {
        "category": "emitted",
        "ownership": "tooling-derived"
      }
    },
    "RebuiltOutputSnapshot": {
      "additionalProperties": false,
      "description": "One rebuilt output file described inside an inspection-bundle metadata document.",
      "properties": {
        "path": {
          "description": "Filesystem path, relative artifact path, or retained evidence path associated with the related record.",
          "minLength": 1,
          "title": "Path",
          "type": "string"
        },
        "sha512": {
          "description": "SHA-512 checksum payload associated with the related artifact.",
          "title": "Sha512",
          "type": "string"
        },
        "size_bytes": {
          "description": "Byte size recorded for the related artifact, retained snapshot, or inventory entry.",
          "minimum": 0,
          "title": "Size Bytes",
          "type": "integer"
        }
      },
      "required": [
        "path",
        "sha512",
        "size_bytes"
      ],
      "title": "RebuiltOutputSnapshot",
      "type": "object",
      "x-buildish-contract": {
        "category": "emitted",
        "ownership": "tooling-derived"
      }
    },
    "RetainedArtifactSnapshot": {
      "additionalProperties": false,
      "description": "One retained file snapshot described inside an inspection-bundle metadata document.",
      "properties": {
        "filename": {
          "description": "Artifact filename as seen in staging, manifests, or retained evidence.",
          "minLength": 1,
          "title": "Filename",
          "type": "string"
        },
        "sha512": {
          "description": "SHA-512 checksum payload associated with the related artifact.",
          "title": "Sha512",
          "type": "string"
        },
        "size_bytes": {
          "description": "Byte size recorded for the related artifact, retained snapshot, or inventory entry.",
          "minimum": 0,
          "title": "Size Bytes",
          "type": "integer"
        }
      },
      "required": [
        "filename",
        "sha512",
        "size_bytes"
      ],
      "title": "RetainedArtifactSnapshot",
      "type": "object",
      "x-buildish-contract": {
        "category": "emitted",
        "ownership": "tooling-derived"
      }
    },
    "ShallowArchiveAnalysisReport": {
      "additionalProperties": false,
      "description": "Durable shallow archive-comparison findings for one retained artifact pair.",
      "properties": {
        "archive_format": {
          "anyOf": [
            {
              "enum": [
                "tar",
                "zip"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Detected top-level archive format of the compared artifact when shallow archive inspection succeeded.",
          "title": "Archive Format"
        },
        "classification": {
          "description": "High-level shallow-comparison classification that summarizes the most important archive drift pattern Buildish observed.",
          "minLength": 1,
          "title": "Classification",
          "type": "string"
        },
        "content_mismatches": {
          "description": "Archive member paths whose direct top-level content bytes differed between the staged and rebuilt artifacts during shallow comparison.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Content Mismatches",
          "type": "array"
        },
        "entry_order_mismatches": {
          "description": "Archive-entry ordering differences detected between the staged and rebuilt artifacts during shallow comparison.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Entry Order Mismatches",
          "type": "array"
        },
        "metadata_mismatches": {
          "description": "Archive-entry metadata differences, such as timestamps, modes, owners, or file-type drift, found during shallow comparison.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Metadata Mismatches",
          "type": "array"
        },
        "missing_paths": {
          "description": "Archive or repository paths that were present in the staged artifact but missing from the rebuilt artifact.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Missing Paths",
          "type": "array"
        },
        "raw_bytes_equal": {
          "description": "Whether raw staged and rebuilt bytes matched before any archive-aware normalization.",
          "title": "Raw Bytes Equal",
          "type": "boolean"
        },
        "rebuilt_archive_format": {
          "description": "Detected top-level archive format of the rebuilt artifact retained for shallow archive inspection.",
          "enum": [
            "tar",
            "zip",
            "non-archive"
          ],
          "title": "Rebuilt Archive Format",
          "type": "string"
        },
        "rebuilt_entry_count": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Number of top-level archive entries found in the rebuilt artifact during shallow inspection.",
          "title": "Rebuilt Entry Count"
        },
        "staged_archive_format": {
          "description": "Detected top-level archive format of the staged artifact retained for shallow archive inspection.",
          "enum": [
            "tar",
            "zip",
            "non-archive"
          ],
          "title": "Staged Archive Format",
          "type": "string"
        },
        "staged_entry_count": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Number of top-level archive entries found in the staged artifact during shallow inspection.",
          "title": "Staged Entry Count"
        },
        "unexpected_paths": {
          "description": "Archive or repository paths that were present only in the rebuilt artifact and not in the staged artifact.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Unexpected Paths",
          "type": "array"
        }
      },
      "required": [
        "classification",
        "raw_bytes_equal",
        "staged_archive_format",
        "rebuilt_archive_format"
      ],
      "title": "ShallowArchiveAnalysisReport",
      "type": "object",
      "x-buildish-contract": {
        "category": "emitted",
        "ownership": "tooling-derived"
      }
    }
  },
  "$id": "https://buildish.org/components/release-tooling/schemas/file-like-reproducibility-metadata.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Retained comparison metadata for one file-like reproducibility failure or drift.",
  "properties": {
    "archive_analysis": {
      "anyOf": [
        {
          "$ref": "#/$defs/ShallowArchiveAnalysisReport"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Shallow top-level archive comparison details retained for reproducibility inspection."
    },
    "artifact_id": {
      "description": "Stable identifier for one source, secondary, or emitted artifact within Buildish release tooling.",
      "minLength": 1,
      "title": "Artifact Id",
      "type": "string"
    },
    "canonical_recipe": {
      "anyOf": [
        {
          "$ref": "#/$defs/ArtifactReproducibilityCanonicalRecipeReport"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Canonical rebuild recipe resolved from the verified source tree or other authoritative Buildish configuration."
    },
    "comparison_mode": {
      "description": "Declared reproducibility comparison mode used for the related artifact or profile.",
      "minLength": 1,
      "title": "Comparison Mode",
      "type": "string"
    },
    "effective_execution": {
      "anyOf": [
        {
          "$ref": "#/$defs/ArtifactReproducibilityEffectiveExecutionReport"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Effective build execution details that Buildish actually ran after applying local overrides or runtime defaults."
    },
    "failure_class": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Structured failure classification that summarizes the main reason why verification or reproducibility failed.",
      "title": "Failure Class"
    },
    "issues": {
      "description": "Collected human-readable issues observed for the related verification, inspection, or reproducibility subject.",
      "items": {
        "type": "string"
      },
      "title": "Issues",
      "type": "array"
    },
    "kind": {
      "description": "Declared artifact or report kind discriminator.",
      "enum": [
        "generic-file",
        "generic-file-with-openpgp",
        "python-distribution",
        "npm-package"
      ],
      "title": "Kind",
      "type": "string"
    },
    "matches_remote_bytes": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Whether the rebuilt artifact bytes matched the staged or signed remote bytes exactly.",
      "title": "Matches Remote Bytes"
    },
    "override": {
      "$ref": "#/$defs/ArtifactReproducibilityOverrideReport",
      "description": "Explicit local reproducibility override details applied on top of the canonical recipe."
    },
    "profile_id": {
      "description": "Reproducibility profile identifier selected for the related artifact or source verification.",
      "minLength": 1,
      "title": "Profile Id",
      "type": "string"
    },
    "rebuilt_outputs": {
      "description": "Snapshot metadata for files or trees produced by a local rebuild step.",
      "items": {
        "$ref": "#/$defs/RebuiltOutputSnapshot"
      },
      "title": "Rebuilt Outputs",
      "type": "array"
    },
    "staged_artifact": {
      "$ref": "#/$defs/RetainedArtifactSnapshot",
      "description": "Retained snapshot metadata for the staged artifact bytes used as the comparison target."
    }
  },
  "required": [
    "artifact_id",
    "kind",
    "profile_id",
    "comparison_mode",
    "staged_artifact"
  ],
  "title": "Buildish Release Tooling FileLikeReproducibilityMetadata",
  "type": "object",
  "x-buildish-contract": {
    "category": "emitted",
    "ownership": "tooling-derived",
    "summary": "Inspection-bundle metadata payload for file-like reproducibility comparisons."
  }
}
