{
  "format": "vercy-enterprise-allocation-fixtures/v2",
  "candidateName": "Production Work Order",
  "cases": [
    {
      "id": "released-order",
      "kind": "positive",
      "input": "An order authorizes 100 units under one plan version.",
      "expect": "Authorization remains distinct from execution.",
      "target": "candidate-allocation-offline-production-work-order",
      "violates": [
        "PWO-INV-01",
        "PWO-INV-06"
      ],
      "closesDefect": [
        "D13"
      ]
    },
    {
      "id": "completed-order",
      "kind": "positive",
      "input": "External events satisfy quantity and criteria.",
      "expect": "Completion references execution evidence.",
      "target": "candidate-allocation-offline-production-work-order",
      "violates": [
        "PWO-INV-08"
      ],
      "closesDefect": [
        "D13"
      ]
    },
    {
      "id": "closed-proof",
      "kind": "negative",
      "input": "Closed status is treated as production evidence.",
      "expect": "The inference is rejected.",
      "target": "candidate-allocation-offline-production-work-order",
      "violates": [
        "PWO-INV-06"
      ],
      "closesDefect": [
        "D13"
      ],
      "expectedCode": "EMOPS04-E034"
    },
    {
      "id": "floating-plan",
      "kind": "negative",
      "input": "An order references an unversioned plan.",
      "expect": "The authorization is rejected.",
      "target": "candidate-allocation-offline-production-work-order",
      "violates": [
        "PWO-INV-03"
      ],
      "closesDefect": [
        "D13"
      ],
      "expectedCode": "EMOPS04-E033"
    },
    {
      "id": "F-PWO-001",
      "target": "candidate-allocation-offline-production-work-order",
      "kind": "positive",
      "input": "An order pins planVersionRef, designRevisionRef and ebomBaselineVersionRef, with quantity stating unit and basis and an explicit decisionRef.",
      "expect": "The authorization validates with all three versions immutably pinned.",
      "violates": [
        "PWO-INV-01",
        "PWO-INV-03",
        "PWO-INV-04"
      ],
      "closesDefect": [
        "D13"
      ]
    },
    {
      "id": "F-PWO-002",
      "target": "candidate-allocation-offline-production-work-order",
      "kind": "negative",
      "input": "An order omits designRevisionRef while claiming pinned definitions.",
      "expect": "The authorization is rejected.",
      "violates": [
        "PWO-INV-03"
      ],
      "closesDefect": [
        "D13"
      ],
      "expectedCode": "EMOPS04-E033"
    },
    {
      "id": "F-PWO-003",
      "target": "candidate-allocation-offline-production-work-order",
      "kind": "negative",
      "input": "An order references WM-OBJ-019 without an ebomBaselineVersionRef.",
      "expect": "The authorization is rejected as unpinned.",
      "violates": [
        "PWO-INV-03"
      ],
      "closesDefect": [
        "D13"
      ],
      "expectedCode": "EMOPS04-E033"
    },
    {
      "id": "F-PWO-004",
      "target": "candidate-allocation-offline-production-work-order",
      "kind": "negative",
      "input": "A closed order with no execution events is reported as 100 units produced rather than execution unknown.",
      "expect": "The inference is rejected and execution stays explicitly unknown.",
      "violates": [
        "PWO-INV-06",
        "PWO-INV-10"
      ],
      "closesDefect": [
        "D13",
        "D27"
      ],
      "expectedCode": "EMOPS04-E034"
    },
    {
      "id": "F-PWO-005",
      "target": "candidate-allocation-offline-production-work-order",
      "kind": "negative",
      "input": "A material reservation is posted as actual consumption against a lot.",
      "expect": "The posting is rejected.",
      "violates": [
        "PWO-INV-07",
        "LE-INV-05"
      ],
      "closesDefect": [
        "D13"
      ],
      "expectedCode": "EMOPS04-E035"
    },
    {
      "id": "F-PWO-006",
      "target": "candidate-allocation-offline-production-work-order",
      "kind": "negative",
      "input": "An order states quantity 100 with no unitCode.",
      "expect": "The authorization is rejected.",
      "violates": [
        "PWO-INV-02",
        "LE-INV-02"
      ],
      "closesDefect": [
        "D8"
      ],
      "expectedCode": "EMOPS04-E007"
    }
  ],
  "contourId": "EM-OPS-04",
  "target": "candidate-allocation-offline-production-work-order",
  "errorCodeRegistryRef": "error-codes.json",
  "defectRegistryRef": "audit-defects.json"
}
