{
  "product_id": "elyreon.dataset.quality",
  "version": "1.0.0",
  "status": "AVAILABLE",
  "billing_mode": "live",
  "title": "ELYREON Dataset Quality — validation, schema, duplicates, privacy warnings",
  "summary": "Returns the Foundry's own blocking and non-blocking quality checks for a dataset, a 0-100 score derived from them, duplicate detection, and privacy-sensitive column warnings. Reuses the existing Foundry quality engine and the dataset-doctor check semantics; it is not a second processing engine.",
  "capability": "dataset.quality_report",
  "customer": {
    "segment": "AI agents and data teams buying or vendoring datasets",
    "buyer": "data engineer, agent developer",
    "job_to_be_done": "decide whether a dataset is usable before spending on it"
  },
  "use_cases": [
    "pre-purchase dataset triage",
    "vendor dataset intake",
    "schema and duplicate audit"
  ],
  "input_schema": {
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "dataset": {
        "type": "string",
        "minLength": 1,
        "maxLength": 120
      },
      "include_privacy_scan": {
        "type": "boolean",
        "default": true
      },
      "include_sample": {
        "type": "boolean",
        "default": false
      }
    },
    "required": [
      "dataset"
    ]
  },
  "output_schema": {
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "product_id": {
        "type": "string"
      },
      "version": {
        "type": "string"
      },
      "generated_at": {
        "type": "string"
      },
      "dataset": {
        "type": "string"
      },
      "score": {
        "type": "integer",
        "minimum": 0,
        "maximum": 100
      },
      "grade": {
        "enum": [
          "A",
          "B",
          "C",
          "D",
          "F"
        ]
      },
      "checks": {
        "type": "array",
        "items": {
          "type": "object"
        }
      },
      "blocking_failures": {
        "type": "integer"
      },
      "duplicates": {
        "type": "object"
      },
      "privacy": {
        "type": "object"
      },
      "limitations": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "provenance": {
        "type": "array",
        "items": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "source_id": {
              "type": "string"
            },
            "engine": {
              "type": "string"
            },
            "endpoint": {
              "type": "string"
            },
            "request_digest": {
              "type": "string"
            },
            "retrieved_at": {
              "type": "string"
            },
            "rows_examined": {
              "type": "integer"
            },
            "freshness": {
              "type": "object"
            }
          },
          "required": []
        }
      }
    },
    "required": []
  },
  "auth": {
    "schemes": [
      "api_key",
      "mcp_oauth"
    ],
    "scopes": [
      "arsenal.dataset.read"
    ],
    "tenant_isolation": "per-tenant upstream credential"
  },
  "pricing": {
    "model": "per_call",
    "unit": "call",
    "list_price_minor": 75,
    "ceiling_minor": 300,
    "approved": true,
    "approval_ref": "INTERNAL-REC-2026-11-14-OWNER-ARSENAL-LIST-PRICES",
    "minimum_charge_minor": 0
  },
  "resources": {
    "max_input_bytes": 2048,
    "timeout_ms": 20000,
    "max_upstream_calls": 3,
    "max_output_rows": 500,
    "max_concurrency": 8
  },
  "errors": [
    "invalid_input",
    "unauthorized",
    "forbidden_scope",
    "insufficient_credit",
    "service_disabled",
    "upstream_unavailable",
    "resource_limit_exceeded",
    "timeout",
    "idempotency_conflict",
    "internal_error"
  ],
  "retry": {
    "idempotency": "required",
    "safe_to_retry": true,
    "on_failure": "released, no charge"
  },
  "data": {
    "sources": [
      "ELYREON Data Foundry /v1/datasets/{slug}/quality",
      "dataset-doctor check semantics (schema, duplicates, PII)"
    ],
    "licensing": "quality metadata is ELYREON-owned; the underlying dataset's own licence is not conveyed",
    "restrictions": [
      "quality metadata only — no rows are returned unless include_sample is honoured and permitted"
    ]
  },
  "upstream": {
    "engine": "foundry",
    "endpoints": [
      "/v1/datasets",
      "/v1/datasets/{slug}",
      "/v1/datasets/{slug}/quality"
    ]
  },
  "limitations": [
    "a dataset with no successful collection run cannot score above 39",
    "privacy scan is column-name and sample-value heuristics, not a formal PII classification"
  ],
  "docs": "docs/products/dataset_quality.md",
  "readiness": {
    "implementation": "present",
    "tests": "test/dataset_quality.test.ts",
    "benchmark": "units in UNIT_ECONOMICS.md"
  }
}