{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arcnm-io/json-schema/arcnm-io-calibration-environment-report-result-schema.json",
  "title": "CalibrationEnvironmentReportResult",
  "description": "Per-driver calibrated-environment report (also exposed to AI agents).\nMirrors the handler; ``extra=\"ignore\"`` drops any undeclared handler key\nby design (fail SAFE — a new key must be declared here first).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arcnm-io-calibration-api-openapi.yml#/components/schemas/CalibrationEnvironmentReportResult",
  "properties": {
    "env_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Env Id",
      "description": "Identifier of the environment this report describes."
    },
    "calibrated": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Calibrated",
      "description": "True when this environment has been calibrated to your actuals."
    },
    "drivers": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Drivers",
      "description": "Per-driver calibrated adjustments (machine / labour / overhead), each a structured object with the adjustment, its confidence interval, and whether it was applied."
    },
    "residual": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Residual",
      "description": "The explicit residual multiplier (tooling/subcontract catch-all)."
    },
    "material": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Material",
      "description": "Pinned (multiplier 1.0) in the per-driver adjustments: no machine, labour or overhead adjustment scales the material line. Where an environment is calibrated with a single overall correction of the unit cost instead, that correction scales material together with every other line. The price per kg is the one you state, or the platform's reference price where you state none; the quantity is the stock the part is cut from; scrap and remnant credits apply only once you state them, at your own scrap price or the platform's reference price where you state none."
    },
    "retired_drivers": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Retired Drivers",
      "description": "Adjustments calibration no longer makes, each with the reason (for example material_quantity_modelled: the material quantity is modelled rather than adjusted). A correction stored for one is not applied, and the next calibration run removes it."
    },
    "provenance": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Provenance",
      "description": "Fit provenance: last_fit_at, corpus_hash, n_effective, run id."
    },
    "note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Note",
      "description": "Present on the public API only: points integrations at the app for the per-driver detail."
    }
  },
  "type": "object"
}