{
  "format": "vercy-enterprise-allocation-fixtures/v2",
  "candidateName": "As-Built Assembly",
  "cases": [
    {
      "id": "attached-component",
      "kind": "positive",
      "input": "An attach event installs an approved alternate.",
      "expect": "A membership opens with event evidence.",
      "target": "candidate-allocation-offline-as-built-assembly",
      "violates": [
        "ABA-INV-01",
        "ABA-INV-03"
      ],
      "closesDefect": [
        "D19"
      ]
    },
    {
      "id": "detached-component",
      "kind": "positive",
      "input": "A detach event removes the component.",
      "expect": "The membership closes without deletion.",
      "target": "candidate-allocation-offline-as-built-assembly",
      "violates": [
        "ABA-INV-06"
      ],
      "closesDefect": [
        "D19"
      ]
    },
    {
      "id": "bom-as-built",
      "kind": "negative",
      "input": "An EBOM row is treated as installed composition.",
      "expect": "The inference is rejected.",
      "target": "candidate-allocation-offline-as-built-assembly",
      "violates": [
        "ABA-INV-02",
        "LE-INV-05"
      ],
      "closesDefect": [
        "D9"
      ],
      "expectedCode": "EMOPS04-E012"
    },
    {
      "id": "silent-replacement",
      "kind": "negative",
      "input": "A component reference is overwritten without events.",
      "expect": "The mutation is rejected.",
      "target": "candidate-allocation-offline-as-built-assembly",
      "violates": [
        "ABA-INV-01",
        "ABA-INV-09"
      ],
      "closesDefect": [
        "D18"
      ],
      "expectedCode": "EMOPS04-E014"
    },
    {
      "id": "F-ABA-001",
      "target": "candidate-allocation-offline-as-built-assembly",
      "kind": "positive",
      "input": "A composition state is recorded with compositionValidFrom, derivedFromEventRefs and a membership carrying sourceEventRef.",
      "expect": "The actual-state record validates with event derivation explicit.",
      "violates": [
        "ABA-INV-01",
        "ABA-INV-03"
      ],
      "closesDefect": [
        "D9"
      ]
    },
    {
      "id": "F-ABA-002",
      "target": "candidate-allocation-offline-as-built-assembly",
      "kind": "negative",
      "input": "effectiveFrom or an effectivity predicate is used to express as-built composition validity.",
      "expect": "The field is rejected; actual-state models carry no effectivity vocabulary.",
      "violates": [
        "ABA-INV-02",
        "LE-INV-05"
      ],
      "closesDefect": [
        "D9"
      ],
      "expectedCode": "EMOPS04-E012"
    },
    {
      "id": "F-ABA-003",
      "target": "candidate-allocation-offline-as-built-assembly",
      "kind": "negative",
      "input": "A membership sets validTo with no closingEventRef.",
      "expect": "The closure is rejected as unevidenced.",
      "violates": [
        "ABA-INV-06",
        "ABA-INV-03"
      ],
      "closesDefect": [
        "D19"
      ],
      "expectedCode": "EMOPS04-E013"
    },
    {
      "id": "F-ABA-004",
      "target": "candidate-allocation-offline-as-built-assembly",
      "kind": "positive",
      "input": "A membership quantity states value, unitCode, unitCodeListVersion and basis.",
      "expect": "The quantity validates under the shared Quantity shape.",
      "violates": [
        "ABA-INV-04",
        "LE-INV-02"
      ],
      "closesDefect": [
        "D8"
      ]
    },
    {
      "id": "F-ABA-005",
      "target": "candidate-allocation-offline-as-built-assembly",
      "kind": "negative",
      "input": "A membership quantity states a unit but no basis.",
      "expect": "The quantity is rejected.",
      "violates": [
        "ABA-INV-04",
        "LE-INV-02"
      ],
      "closesDefect": [
        "D8"
      ],
      "expectedCode": "EMOPS04-E008"
    },
    {
      "id": "F-ABA-006",
      "target": "candidate-allocation-offline-as-built-assembly",
      "kind": "negative",
      "input": "A composition assertion omits assertionBasis so declared and observed content merge.",
      "expect": "The assertion is rejected.",
      "violates": [
        "ABA-INV-01"
      ],
      "closesDefect": [
        "D11"
      ],
      "expectedCode": "EMOPS04-E030"
    },
    {
      "id": "F-ABA-007",
      "target": "candidate-allocation-offline-as-built-assembly",
      "kind": "negative",
      "input": "The as-built record asserts lot identity for a consumed bulk component.",
      "expect": "The assertion is rejected; lot identity is mastered elsewhere.",
      "violates": [
        "ABA-INV-01",
        "LE-INV-09"
      ],
      "closesDefect": [
        "D17"
      ],
      "expectedCode": "EMOPS04-E038"
    },
    {
      "id": "F-ABA-008",
      "target": "candidate-allocation-offline-as-built-assembly",
      "kind": "negative",
      "input": "Firmware 1.2.0 is recorded as a component membership of the serialized parent.",
      "expect": "The membership is rejected; firmware presence requires an external installation occurrence.",
      "violates": [
        "ABA-INV-08",
        "LE-INV-08"
      ],
      "closesDefect": [
        "D14"
      ],
      "expectedCode": "EMOPS04-E016"
    },
    {
      "id": "F-ABA-009",
      "target": "candidate-allocation-offline-as-built-assembly",
      "kind": "positive",
      "input": "WM-FLW-013 is referenced as verified-supplied so every genealogy edge must cite an actual event with evidence.",
      "expect": "The reference set satisfies minimumVerifiedReferences.",
      "violates": [
        "ABA-INV-01",
        "LE-INV-05"
      ],
      "closesDefect": [
        "D15"
      ]
    },
    {
      "id": "F-ABA-010",
      "target": "candidate-allocation-offline-as-built-assembly",
      "kind": "negative",
      "input": "The lifecycle retains the intent-time state 'effective' for an actual composition record.",
      "expect": "The lifecycle is rejected; 'current' replaces it.",
      "violates": [
        "ABA-INV-02"
      ],
      "closesDefect": [
        "D6"
      ],
      "expectedCode": "EMOPS04-E004"
    },
    {
      "id": "F-ABA-011",
      "target": "candidate-allocation-offline-as-built-assembly",
      "kind": "negative",
      "input": "A component with no event evidence is recorded with quantity zero instead of unknown.",
      "expect": "The collapse is rejected; unknown stays explicit.",
      "violates": [
        "ABA-INV-10"
      ],
      "closesDefect": [
        "D27"
      ],
      "expectedCode": "EMOPS04-E039"
    }
  ],
  "contourId": "EM-OPS-04",
  "target": "candidate-allocation-offline-as-built-assembly",
  "errorCodeRegistryRef": "error-codes.json",
  "defectRegistryRef": "audit-defects.json"
}
