{
  "$defs": {
    "ConvergenceMetricValue": {
      "additionalProperties": false,
      "description": "One typed trace value tied to the result that produced it.",
      "properties": {
        "canonical_unit": {
          "maxLength": 32,
          "minLength": 1,
          "title": "Canonical Unit",
          "type": "string"
        },
        "metric_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Metric Id",
          "type": "string"
        },
        "source_result_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Source Result Id",
          "type": "string"
        },
        "value": {
          "title": "Value",
          "type": "number"
        }
      },
      "required": [
        "metric_id",
        "source_result_id",
        "value",
        "canonical_unit"
      ],
      "title": "ConvergenceMetricValue",
      "type": "object"
    },
    "ConvergenceResultReference": {
      "additionalProperties": false,
      "description": "Identity and dependency projection for one iteration-local result.",
      "properties": {
        "domain": {
          "$ref": "#/$defs/EngineeringDomain"
        },
        "payload_kind": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Payload Kind",
          "type": "string"
        },
        "result_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Result Id",
          "type": "string"
        },
        "upstream_result_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Upstream Result Ids",
          "type": "array"
        }
      },
      "required": [
        "result_id",
        "domain",
        "payload_kind"
      ],
      "title": "ConvergenceResultReference",
      "type": "object"
    },
    "CouplingObservation": {
      "additionalProperties": false,
      "properties": {
        "applied_value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Applied Value"
        },
        "canonical_unit": {
          "maxLength": 32,
          "minLength": 1,
          "title": "Canonical Unit",
          "type": "string"
        },
        "component_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Component Id"
        },
        "consumer_iteration_lag": {
          "default": 0,
          "enum": [
            0,
            1
          ],
          "title": "Consumer Iteration Lag",
          "type": "integer"
        },
        "consumers": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "minItems": 1,
          "title": "Consumers",
          "type": "array"
        },
        "damping_factor": {
          "anyOf": [
            {
              "exclusiveMinimum": 0,
              "maximum": 1,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Damping Factor"
        },
        "delta": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Delta"
        },
        "exchange_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Exchange Id",
          "type": "string"
        },
        "mode_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Mode Id"
        },
        "observation_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Observation Id",
          "type": "string"
        },
        "oscillating": {
          "default": false,
          "title": "Oscillating",
          "type": "boolean"
        },
        "owner_result_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Owner Result Id",
          "type": "string"
        },
        "previous_value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Previous Value"
        },
        "quantity_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Quantity Id",
          "type": "string"
        },
        "reason": {
          "anyOf": [
            {
              "maxLength": 512,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Reason"
        },
        "residual": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Residual"
        },
        "scenario_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Scenario Id"
        },
        "source_identity": {
          "anyOf": [
            {
              "maxLength": 512,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Source Identity"
        },
        "state_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "State Id"
        },
        "update_action": {
          "default": "direct",
          "enum": [
            "direct",
            "damped",
            "discrete",
            "fixed_hardware"
          ],
          "title": "Update Action",
          "type": "string"
        },
        "validity": {
          "enum": [
            "known",
            "partial",
            "unavailable"
          ],
          "title": "Validity",
          "type": "string"
        },
        "value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Value"
        }
      },
      "required": [
        "observation_id",
        "exchange_id",
        "quantity_id",
        "owner_result_id",
        "consumers",
        "canonical_unit",
        "value",
        "validity"
      ],
      "title": "CouplingObservation",
      "type": "object"
    },
    "EngineeringDomain": {
      "enum": [
        "system",
        "mission",
        "environment",
        "mass",
        "power",
        "thermal",
        "propulsion",
        "adcs",
        "communications",
        "launch",
        "lifetime",
        "cost",
        "geometry",
        "placement",
        "deployables",
        "operations"
      ],
      "title": "EngineeringDomain",
      "type": "string"
    }
  },
  "$id": "urn:sindri:contracts:1.0.0:convergence-iteration",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Strict trace row with legacy flat values retained for current consumers.",
  "properties": {
    "battery_capacity_wh": {
      "minimum": 0.0,
      "title": "Battery Capacity Wh",
      "type": "number"
    },
    "cost_estimate_constant_usd_2025": {
      "minimum": 0.0,
      "title": "Cost Estimate Constant Usd 2025",
      "type": "number"
    },
    "coupling": {
      "default": [],
      "items": {
        "$ref": "#/$defs/CouplingObservation"
      },
      "maxItems": 4096,
      "title": "Coupling",
      "type": "array"
    },
    "deployable_evaluation_scope": {
      "anyOf": [
        {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Deployable Evaluation Scope"
    },
    "deployable_family_id": {
      "anyOf": [
        {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Deployable Family Id"
    },
    "deployable_feasible": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Deployable Feasible"
    },
    "deployable_lifecycle_events": {
      "default": [],
      "items": {
        "maxLength": 128,
        "minLength": 1,
        "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
        "type": "string"
      },
      "title": "Deployable Lifecycle Events",
      "type": "array"
    },
    "deployable_mechanism_id": {
      "anyOf": [
        {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Deployable Mechanism Id"
    },
    "deployable_required_solar_area_m2": {
      "anyOf": [
        {
          "minimum": 0.0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Deployable Required Solar Area M2"
    },
    "deployable_selection_frozen": {
      "default": false,
      "title": "Deployable Selection Frozen",
      "type": "boolean"
    },
    "deployable_sizing_state_consistent": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Deployable Sizing State Consistent"
    },
    "dry_mass_kg": {
      "minimum": 0.0,
      "title": "Dry Mass Kg",
      "type": "number"
    },
    "iteration": {
      "minimum": 1,
      "title": "Iteration",
      "type": "integer"
    },
    "launch_selected_envelope_id": {
      "anyOf": [
        {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Launch Selected Envelope Id"
    },
    "launch_separation_system_id": {
      "anyOf": [
        {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Launch Separation System Id"
    },
    "launcher_orientation_frozen": {
      "default": false,
      "title": "Launcher Orientation Frozen",
      "type": "boolean"
    },
    "launcher_orientation_id": {
      "anyOf": [
        {
          "maxLength": 32,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Launcher Orientation Id"
    },
    "launcher_orientation_mode": {
      "anyOf": [
        {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Launcher Orientation Mode"
    },
    "max_residual": {
      "minimum": 0.0,
      "title": "Max Residual",
      "type": "number"
    },
    "packaging_margin_m3": {
      "title": "Packaging Margin M3",
      "type": "number"
    },
    "packaging_unplaced_count": {
      "minimum": 0,
      "title": "Packaging Unplaced Count",
      "type": "integer"
    },
    "propellant_mass_kg": {
      "minimum": 0.0,
      "title": "Propellant Mass Kg",
      "type": "number"
    },
    "residuals": {
      "patternProperties": {
        "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$": {
          "type": "number"
        }
      },
      "propertyNames": {
        "maxLength": 128,
        "minLength": 1
      },
      "title": "Residuals",
      "type": "object"
    },
    "results": {
      "items": {
        "$ref": "#/$defs/ConvergenceResultReference"
      },
      "minItems": 1,
      "title": "Results",
      "type": "array"
    },
    "solar_array_area_m2": {
      "minimum": 0.0,
      "title": "Solar Array Area M2",
      "type": "number"
    },
    "topology_frozen": {
      "default": false,
      "title": "Topology Frozen",
      "type": "boolean"
    },
    "topology_id": {
      "anyOf": [
        {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Topology Id"
    },
    "topology_mode": {
      "anyOf": [
        {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Topology Mode"
    },
    "values": {
      "items": {
        "$ref": "#/$defs/ConvergenceMetricValue"
      },
      "minItems": 1,
      "title": "Values",
      "type": "array"
    }
  },
  "required": [
    "iteration",
    "residuals",
    "max_residual",
    "results",
    "values",
    "dry_mass_kg",
    "propellant_mass_kg",
    "solar_array_area_m2",
    "battery_capacity_wh",
    "cost_estimate_constant_usd_2025",
    "packaging_margin_m3",
    "packaging_unplaced_count"
  ],
  "title": "ConvergenceIterationRecord",
  "type": "object",
  "x-sindri-contract-suite": "sindri.contracts",
  "x-sindri-contract-version": "1.0.0"
}
