{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/huggingbay-xyz/json-schema/huggingbay-xyz-public-dataset-inspection-schema.json",
  "title": "PublicDatasetInspection",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/huggingbay-xyz-openapi.json#/components/schemas/PublicDatasetInspection",
  "type": "object",
  "required": [
    "schemaVersion",
    "artifactId",
    "state",
    "source",
    "license",
    "structure",
    "files",
    "claims",
    "hosting",
    "evidence",
    "crossSourceEquality",
    "blockers",
    "uncertainties",
    "inspectionCommand",
    "action",
    "safety"
  ],
  "properties": {
    "schemaVersion": {
      "const": "hugging-bay.public-dataset-inspection.v1"
    },
    "artifactId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 300,
      "pattern": "^[^/\\\\\\u0000-\\u001f\\u007f]+$"
    },
    "state": {
      "enum": [
        "ready",
        "degraded",
        "blocked"
      ]
    },
    "source": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "object",
          "required": [
            "provider",
            "identity",
            "revision",
            "immutable",
            "treeDigest",
            "url"
          ],
          "properties": {
            "provider": {
              "const": "huggingface"
            },
            "identity": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,99}/[A-Za-z0-9][A-Za-z0-9._-]{0,199}$"
            },
            "revision": {
              "type": "string",
              "pattern": "^[a-f0-9]{40}(?:[a-f0-9]{24})?$"
            },
            "immutable": {
              "const": true
            },
            "treeDigest": {
              "type": "string",
              "pattern": "^sha256:[a-f0-9]{64}$"
            },
            "url": {
              "type": "string",
              "maxLength": 1024,
              "pattern": "^https://huggingface\\.co/datasets/[A-Za-z0-9._%~-]+/[A-Za-z0-9._%~-]+/tree/[a-f0-9]{40}(?:[a-f0-9]{24})?$"
            },
            "note": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "summary"
                  ],
                  "properties": {
                    "summary": {
                      "type": "string"
                    },
                    "downloadable": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "noteMessage": {
              "type": "string",
              "description": "Original route note, when a public qualification occupies note."
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "license": {
      "type": "object",
      "required": [
        "expression",
        "gating",
        "redistribution"
      ],
      "properties": {
        "expression": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 240
            },
            {
              "type": "null"
            }
          ]
        },
        "gating": {
          "enum": [
            "public-ungated",
            "gated",
            "unknown"
          ]
        },
        "redistribution": {
          "enum": [
            "approved",
            "unknown"
          ]
        },
        "policy": {
          "const": "mirror"
        },
        "evidenceDigest": {
          "type": "string",
          "pattern": "^sha256:[a-f0-9]{64}$"
        },
        "reviewedAt": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?Z$"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "required": [
                "summary"
              ],
              "properties": {
                "summary": {
                  "type": "string"
                },
                "downloadable": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          ]
        },
        "noteMessage": {
          "type": "string",
          "description": "Original route note, when a public qualification occupies note."
        }
      },
      "additionalProperties": false
    },
    "structure": {
      "type": "object",
      "required": [
        "configs",
        "selectedCoverage"
      ],
      "properties": {
        "selectedCoverage": {
          "enum": [
            "complete-selected-subset",
            "unknown"
          ]
        },
        "configs": {
          "type": "array",
          "maxItems": 1,
          "items": {
            "type": "object",
            "required": [
              "name",
              "splits"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "splits": {
                "type": "array",
                "minItems": 1,
                "maxItems": 1,
                "items": {
                  "type": "object",
                  "required": [
                    "name",
                    "subsets"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    },
                    "subsets": {
                      "type": "array",
                      "minItems": 1,
                      "maxItems": 1,
                      "items": {
                        "type": "object",
                        "required": [
                          "name",
                          "partitions"
                        ],
                        "properties": {
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "partitions": {
                            "type": "array",
                            "minItems": 1,
                            "maxItems": 256,
                            "items": {
                              "type": "object",
                              "required": [
                                "key",
                                "files",
                                "rowCount"
                              ],
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                "files": {
                                  "type": "array",
                                  "minItems": 1,
                                  "maxItems": 256,
                                  "uniqueItems": true,
                                  "items": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024,
                                    "pattern": "^(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*\\\\)[^\\u0000-\\u001f\\u007f]+$"
                                  }
                                },
                                "rowCount": {
                                  "type": "object",
                                  "required": [
                                    "value",
                                    "attestation",
                                    "evidenceDigest"
                                  ],
                                  "properties": {
                                    "value": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "attestation": {
                                      "const": "authoritative"
                                    },
                                    "evidenceDigest": {
                                      "type": "string",
                                      "pattern": "^sha256:[a-f0-9]{64}$"
                                    },
                                    "note": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "object",
                                          "required": [
                                            "summary"
                                          ],
                                          "properties": {
                                            "summary": {
                                              "type": "string"
                                            },
                                            "downloadable": {
                                              "type": "boolean"
                                            }
                                          },
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    "noteMessage": {
                                      "type": "string",
                                      "description": "Original route note, when a public qualification occupies note."
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "note": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "summary"
                                      ],
                                      "properties": {
                                        "summary": {
                                          "type": "string"
                                        },
                                        "downloadable": {
                                          "type": "boolean"
                                        }
                                      },
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "noteMessage": {
                                  "type": "string",
                                  "description": "Original route note, when a public qualification occupies note."
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "note": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "object",
                                "required": [
                                  "summary"
                                ],
                                "properties": {
                                  "summary": {
                                    "type": "string"
                                  },
                                  "downloadable": {
                                    "type": "boolean"
                                  }
                                },
                                "additionalProperties": false
                              }
                            ]
                          },
                          "noteMessage": {
                            "type": "string",
                            "description": "Original route note, when a public qualification occupies note."
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "note": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "object",
                          "required": [
                            "summary"
                          ],
                          "properties": {
                            "summary": {
                              "type": "string"
                            },
                            "downloadable": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    },
                    "noteMessage": {
                      "type": "string",
                      "description": "Original route note, when a public qualification occupies note."
                    }
                  },
                  "additionalProperties": false
                }
              },
              "note": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "object",
                    "required": [
                      "summary"
                    ],
                    "properties": {
                      "summary": {
                        "type": "string"
                      },
                      "downloadable": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              },
              "noteMessage": {
                "type": "string",
                "description": "Original route note, when a public qualification occupies note."
              }
            },
            "additionalProperties": false
          }
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "required": [
                "summary"
              ],
              "properties": {
                "summary": {
                  "type": "string"
                },
                "downloadable": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          ]
        },
        "noteMessage": {
          "type": "string",
          "description": "Original route note, when a public qualification occupies note."
        }
      },
      "additionalProperties": false
    },
    "files": {
      "type": "array",
      "maxItems": 256,
      "items": {
        "type": "object",
        "required": [
          "path",
          "partition",
          "format",
          "sizeBytes",
          "sha256",
          "hosted"
        ],
        "properties": {
          "path": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "pattern": "^(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*\\\\)[^\\u0000-\\u001f\\u007f]+$"
          },
          "partition": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
          },
          "format": {
            "const": "parquet"
          },
          "sizeBytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "sha256": {
            "type": "string",
            "pattern": "^sha256:[a-f0-9]{64}$"
          },
          "hosted": {
            "type": "boolean"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "required": [
                  "summary"
                ],
                "properties": {
                  "summary": {
                    "type": "string"
                  },
                  "downloadable": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            ]
          },
          "noteMessage": {
            "type": "string",
            "description": "Original route note, when a public qualification occupies note."
          }
        },
        "additionalProperties": false
      }
    },
    "claims": {
      "type": "object",
      "required": [
        "rows",
        "schema",
        "rawRowsIncluded"
      ],
      "properties": {
        "rows": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "object",
              "required": [
                "value",
                "scope",
                "attestation",
                "method",
                "observedAt",
                "evidenceDigest"
              ],
              "properties": {
                "value": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "scope": {
                  "const": "complete-selected-subset"
                },
                "attestation": {
                  "const": "authoritative"
                },
                "method": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "observedAt": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?Z$"
                },
                "evidenceDigest": {
                  "type": "string",
                  "pattern": "^sha256:[a-f0-9]{64}$"
                },
                "note": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "required": [
                        "summary"
                      ],
                      "properties": {
                        "summary": {
                          "type": "string"
                        },
                        "downloadable": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  ]
                },
                "noteMessage": {
                  "type": "string",
                  "description": "Original route note, when a public qualification occupies note."
                }
              },
              "additionalProperties": false
            }
          ]
        },
        "schema": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "object",
              "required": [
                "format",
                "fingerprint",
                "physicalLeafColumnCount",
                "fieldNamesIncluded",
                "rowValuesIncluded",
                "attestation",
                "evidenceDigest"
              ],
              "properties": {
                "format": {
                  "const": "parquet"
                },
                "fingerprint": {
                  "type": "string",
                  "pattern": "^sha256:[a-f0-9]{64}$"
                },
                "physicalLeafColumnCount": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 256
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "fieldNamesIncluded": {
                  "const": false
                },
                "rowValuesIncluded": {
                  "const": false
                },
                "attestation": {
                  "const": "authoritative"
                },
                "evidenceDigest": {
                  "type": "string",
                  "pattern": "^sha256:[a-f0-9]{64}$"
                },
                "note": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "required": [
                        "summary"
                      ],
                      "properties": {
                        "summary": {
                          "type": "string"
                        },
                        "downloadable": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  ]
                },
                "noteMessage": {
                  "type": "string",
                  "description": "Original route note, when a public qualification occupies note."
                }
              },
              "additionalProperties": false
            }
          ]
        },
        "rawRowsIncluded": {
          "const": false
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "required": [
                "summary"
              ],
              "properties": {
                "summary": {
                  "type": "string"
                },
                "downloadable": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          ]
        },
        "noteMessage": {
          "type": "string",
          "description": "Original route note, when a public qualification occupies note."
        }
      },
      "additionalProperties": false
    },
    "hosting": {
      "type": "object",
      "required": [
        "state",
        "selectedFileCount",
        "verifiedHostedFileCount",
        "preview"
      ],
      "properties": {
        "state": {
          "enum": [
            "external",
            "partial",
            "complete",
            "unknown"
          ]
        },
        "selectedFileCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 256
        },
        "verifiedHostedFileCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 256
        },
        "preview": {
          "anyOf": [
            {
              "type": "object",
              "required": [
                "state",
                "coverage",
                "fullCoverage"
              ],
              "properties": {
                "state": {
                  "const": "unavailable"
                },
                "coverage": {
                  "const": "sample-only"
                },
                "fullCoverage": {
                  "const": false
                },
                "note": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "required": [
                        "summary"
                      ],
                      "properties": {
                        "summary": {
                          "type": "string"
                        },
                        "downloadable": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  ]
                },
                "noteMessage": {
                  "type": "string",
                  "description": "Original route note, when a public qualification occupies note."
                }
              },
              "additionalProperties": false
            },
            {
              "type": "object",
              "required": [
                "state",
                "coverage",
                "fullCoverage",
                "rowCount",
                "truncated",
                "evidenceDigest"
              ],
              "properties": {
                "state": {
                  "enum": [
                    "attested-not-published",
                    "publication-authority-missing"
                  ]
                },
                "coverage": {
                  "const": "sample-only"
                },
                "fullCoverage": {
                  "const": false
                },
                "rowCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 5
                },
                "truncated": {
                  "type": "boolean"
                },
                "evidenceDigest": {
                  "type": "string",
                  "pattern": "^sha256:[a-f0-9]{64}$"
                },
                "note": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "required": [
                        "summary"
                      ],
                      "properties": {
                        "summary": {
                          "type": "string"
                        },
                        "downloadable": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  ]
                },
                "noteMessage": {
                  "type": "string",
                  "description": "Original route note, when a public qualification occupies note."
                }
              },
              "additionalProperties": false
            }
          ]
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "required": [
                "summary"
              ],
              "properties": {
                "summary": {
                  "type": "string"
                },
                "downloadable": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          ]
        },
        "noteMessage": {
          "type": "string",
          "description": "Original route note, when a public qualification occupies note."
        }
      },
      "additionalProperties": false
    },
    "evidence": {
      "type": "object",
      "required": [
        "representationState",
        "freshness",
        "digests"
      ],
      "properties": {
        "representationState": {
          "enum": [
            "unknown",
            "missing",
            "ambiguous-parquet-inspection",
            "invalid",
            "metadata-only",
            "support-only",
            "partial-selected-data",
            "evidence-incomplete",
            "review-blocked",
            "load-unverified",
            "complete-selected-data"
          ]
        },
        "freshness": {
          "type": "object",
          "required": [
            "status",
            "evaluatedAt",
            "maxAgeMs",
            "items",
            "stale"
          ],
          "properties": {
            "status": {
              "enum": [
                "current",
                "stale",
                "unknown"
              ]
            },
            "evaluatedAt": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?Z$"
            },
            "maxAgeMs": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 31536000000
                },
                {
                  "type": "null"
                }
              ]
            },
            "items": {
              "type": "array",
              "maxItems": 5,
              "items": {
                "type": "object",
                "required": [
                  "kind",
                  "observedAt"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "inventory",
                      "rights-review",
                      "pii-review",
                      "row-count",
                      "clean-load"
                    ]
                  },
                  "observedAt": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?Z$"
                  },
                  "note": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object",
                        "required": [
                          "summary"
                        ],
                        "properties": {
                          "summary": {
                            "type": "string"
                          },
                          "downloadable": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      }
                    ]
                  },
                  "noteMessage": {
                    "type": "string",
                    "description": "Original route note, when a public qualification occupies note."
                  }
                },
                "additionalProperties": false
              }
            },
            "stale": {
              "type": "array",
              "maxItems": 5,
              "uniqueItems": true,
              "items": {
                "enum": [
                  "inventory",
                  "rights-review",
                  "pii-review",
                  "row-count",
                  "clean-load"
                ]
              }
            },
            "note": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "summary"
                  ],
                  "properties": {
                    "summary": {
                      "type": "string"
                    },
                    "downloadable": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "noteMessage": {
              "type": "string",
              "description": "Original route note, when a public qualification occupies note."
            }
          },
          "additionalProperties": false
        },
        "digests": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "object",
              "required": [
                "representation",
                "inventory",
                "selectedFiles",
                "schema",
                "rows",
                "cleanLoad",
                "piiReview"
              ],
              "properties": {
                "representation": {
                  "type": "string",
                  "pattern": "^sha256:[a-f0-9]{64}$"
                },
                "inventory": {
                  "type": "string",
                  "pattern": "^sha256:[a-f0-9]{64}$"
                },
                "selectedFiles": {
                  "type": "string",
                  "pattern": "^sha256:[a-f0-9]{64}$"
                },
                "schema": {
                  "type": "string",
                  "pattern": "^sha256:[a-f0-9]{64}$"
                },
                "rows": {
                  "type": "string",
                  "pattern": "^sha256:[a-f0-9]{64}$"
                },
                "cleanLoad": {
                  "type": "string",
                  "pattern": "^sha256:[a-f0-9]{64}$"
                },
                "piiReview": {
                  "type": "string",
                  "pattern": "^sha256:[a-f0-9]{64}$"
                },
                "note": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "required": [
                        "summary"
                      ],
                      "properties": {
                        "summary": {
                          "type": "string"
                        },
                        "downloadable": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  ]
                },
                "noteMessage": {
                  "type": "string",
                  "description": "Original route note, when a public qualification occupies note."
                }
              },
              "additionalProperties": false
            }
          ]
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "required": [
                "summary"
              ],
              "properties": {
                "summary": {
                  "type": "string"
                },
                "downloadable": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          ]
        },
        "noteMessage": {
          "type": "string",
          "description": "Original route note, when a public qualification occupies note."
        }
      },
      "additionalProperties": false
    },
    "crossSourceEquality": {
      "type": "object",
      "required": [
        "state"
      ],
      "properties": {
        "state": {
          "const": "not-claimed"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "required": [
                "summary"
              ],
              "properties": {
                "summary": {
                  "type": "string"
                },
                "downloadable": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          ]
        },
        "noteMessage": {
          "type": "string",
          "description": "Original route note, when a public qualification occupies note."
        }
      },
      "additionalProperties": false
    },
    "blockers": {
      "type": "array",
      "maxItems": 32,
      "uniqueItems": true,
      "items": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "maxLength": 120
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "required": [
                  "summary"
                ],
                "properties": {
                  "summary": {
                    "type": "string"
                  },
                  "downloadable": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            ]
          },
          "noteMessage": {
            "type": "string",
            "description": "Original route note, when a public qualification occupies note."
          }
        },
        "additionalProperties": false
      }
    },
    "uncertainties": {
      "type": "array",
      "maxItems": 16,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 500
      }
    },
    "inspectionCommand": {
      "type": "object",
      "required": [
        "argv",
        "display",
        "shell",
        "executesDatasetCode"
      ],
      "properties": {
        "argv": {
          "type": "array",
          "minItems": 5,
          "maxItems": 5,
          "prefixItems": [
            {
              "const": "curl"
            },
            {
              "const": "--fail"
            },
            {
              "const": "--silent"
            },
            {
              "const": "--show-error"
            },
            {
              "type": "string",
              "pattern": "^https://huggingbay\\.xyz/api/artifacts/[^/]+/dataset-inspection$",
              "maxLength": 1024
            }
          ],
          "items": false
        },
        "display": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1200,
          "pattern": "^'curl' '--fail' '--silent' '--show-error' 'https://huggingbay\\.xyz/api/artifacts/.+/dataset-inspection'$"
        },
        "shell": {
          "const": false
        },
        "executesDatasetCode": {
          "const": false
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "required": [
                "summary"
              ],
              "properties": {
                "summary": {
                  "type": "string"
                },
                "downloadable": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          ]
        },
        "noteMessage": {
          "type": "string",
          "description": "Original route note, when a public qualification occupies note."
        }
      },
      "additionalProperties": false
    },
    "action": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "object",
          "required": [
            "id",
            "label",
            "href"
          ],
          "properties": {
            "id": {
              "const": "open-immutable-source"
            },
            "label": {
              "const": "Open immutable source"
            },
            "href": {
              "type": "string",
              "maxLength": 1024,
              "pattern": "^https://huggingface\\.co/datasets/[A-Za-z0-9._%~-]+/[A-Za-z0-9._%~-]+/tree/[a-f0-9]{40}(?:[a-f0-9]{24})?$"
            },
            "note": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "summary"
                  ],
                  "properties": {
                    "summary": {
                      "type": "string"
                    },
                    "downloadable": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "noteMessage": {
              "type": "string",
              "description": "Original route note, when a public qualification occupies note."
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "safety": {
      "type": "object",
      "required": [
        "rawRowsIncluded",
        "publisherProseIncluded",
        "executableCommandsIncluded",
        "signedUrlsIncluded"
      ],
      "properties": {
        "rawRowsIncluded": {
          "const": false
        },
        "publisherProseIncluded": {
          "const": false
        },
        "executableCommandsIncluded": {
          "const": false
        },
        "signedUrlsIncluded": {
          "const": false
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "required": [
                "summary"
              ],
              "properties": {
                "summary": {
                  "type": "string"
                },
                "downloadable": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          ]
        },
        "noteMessage": {
          "type": "string",
          "description": "Original route note, when a public qualification occupies note."
        }
      },
      "additionalProperties": false
    },
    "note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "object",
          "required": [
            "summary"
          ],
          "properties": {
            "summary": {
              "type": "string"
            },
            "downloadable": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "noteMessage": {
      "type": "string",
      "description": "Original route note, when a public qualification occupies note."
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "state": {
            "const": "blocked"
          }
        },
        "required": [
          "state"
        ]
      },
      "then": {
        "properties": {
          "source": {
            "type": "null"
          },
          "license": {
            "properties": {
              "gating": {
                "enum": [
                  "gated",
                  "unknown"
                ]
              },
              "redistribution": {
                "const": "unknown"
              }
            }
          },
          "structure": {
            "properties": {
              "selectedCoverage": {
                "const": "unknown"
              },
              "configs": {
                "maxItems": 0
              }
            }
          },
          "files": {
            "maxItems": 0
          },
          "action": {
            "type": "null"
          },
          "claims": {
            "properties": {
              "rows": {
                "type": "null"
              },
              "schema": {
                "type": "null"
              }
            }
          },
          "hosting": {
            "properties": {
              "state": {
                "const": "unknown"
              },
              "selectedFileCount": {
                "const": 0
              },
              "verifiedHostedFileCount": {
                "const": 0
              }
            }
          },
          "evidence": {
            "properties": {
              "digests": {
                "type": "null"
              },
              "freshness": {
                "properties": {
                  "status": {
                    "const": "unknown"
                  }
                }
              }
            }
          },
          "blockers": {
            "minItems": 1
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "state": {
            "enum": [
              "ready",
              "degraded"
            ]
          }
        },
        "required": [
          "state"
        ]
      },
      "then": {
        "properties": {
          "source": {
            "type": "object"
          },
          "license": {
            "properties": {
              "gating": {
                "const": "public-ungated"
              },
              "redistribution": {
                "const": "approved"
              }
            },
            "required": [
              "policy",
              "evidenceDigest",
              "reviewedAt"
            ]
          },
          "structure": {
            "properties": {
              "selectedCoverage": {
                "const": "complete-selected-subset"
              },
              "configs": {
                "minItems": 1
              }
            }
          },
          "files": {
            "minItems": 1
          },
          "claims": {
            "properties": {
              "rows": {
                "type": "object",
                "required": [
                  "value",
                  "scope",
                  "attestation",
                  "method",
                  "observedAt",
                  "evidenceDigest"
                ],
                "properties": {
                  "value": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "scope": {
                    "const": "complete-selected-subset"
                  },
                  "attestation": {
                    "const": "authoritative"
                  },
                  "method": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "observedAt": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?Z$"
                  },
                  "evidenceDigest": {
                    "type": "string",
                    "pattern": "^sha256:[a-f0-9]{64}$"
                  },
                  "note": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object",
                        "required": [
                          "summary"
                        ],
                        "properties": {
                          "summary": {
                            "type": "string"
                          },
                          "downloadable": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      }
                    ]
                  },
                  "noteMessage": {
                    "type": "string",
                    "description": "Original route note, when a public qualification occupies note."
                  }
                },
                "additionalProperties": false
              },
              "schema": {
                "type": "object",
                "required": [
                  "format",
                  "fingerprint",
                  "physicalLeafColumnCount",
                  "fieldNamesIncluded",
                  "rowValuesIncluded",
                  "attestation",
                  "evidenceDigest"
                ],
                "properties": {
                  "format": {
                    "const": "parquet"
                  },
                  "fingerprint": {
                    "type": "string",
                    "pattern": "^sha256:[a-f0-9]{64}$"
                  },
                  "physicalLeafColumnCount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 256
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "fieldNamesIncluded": {
                    "const": false
                  },
                  "rowValuesIncluded": {
                    "const": false
                  },
                  "attestation": {
                    "const": "authoritative"
                  },
                  "evidenceDigest": {
                    "type": "string",
                    "pattern": "^sha256:[a-f0-9]{64}$"
                  },
                  "note": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object",
                        "required": [
                          "summary"
                        ],
                        "properties": {
                          "summary": {
                            "type": "string"
                          },
                          "downloadable": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      }
                    ]
                  },
                  "noteMessage": {
                    "type": "string",
                    "description": "Original route note, when a public qualification occupies note."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "hosting": {
            "properties": {
              "state": {
                "enum": [
                  "external",
                  "partial",
                  "complete"
                ]
              },
              "selectedFileCount": {
                "minimum": 1
              }
            }
          },
          "evidence": {
            "properties": {
              "representationState": {
                "const": "complete-selected-data"
              },
              "freshness": {
                "properties": {
                  "status": {
                    "const": "current"
                  }
                }
              },
              "digests": {
                "type": "object"
              }
            }
          },
          "action": {
            "type": "object",
            "required": [
              "id",
              "label",
              "href"
            ],
            "properties": {
              "id": {
                "const": "open-immutable-source"
              },
              "label": {
                "const": "Open immutable source"
              },
              "href": {
                "type": "string",
                "maxLength": 1024,
                "pattern": "^https://huggingface\\.co/datasets/[A-Za-z0-9._%~-]+/[A-Za-z0-9._%~-]+/tree/[a-f0-9]{40}(?:[a-f0-9]{24})?$"
              },
              "note": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "object",
                    "required": [
                      "summary"
                    ],
                    "properties": {
                      "summary": {
                        "type": "string"
                      },
                      "downloadable": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              },
              "noteMessage": {
                "type": "string",
                "description": "Original route note, when a public qualification occupies note."
              }
            },
            "additionalProperties": false
          },
          "blockers": {
            "maxItems": 0
          }
        }
      }
    }
  ],
  "additionalProperties": false
}