{
  "version": 1,
  "author": "Aryo Utomo",
  "reviewed": "2026-11-28",
  "data_kind": "synthetic",
  "method": "Deterministic local calculation; no network, email, ERP, database or production workflow involved.",
  "limitations": "Not customer results; sequential rules only, no concurrency or real provider failure tests.",
  "case": "api",
  "events": [
    {
      "event": "EV-01",
      "org": "ORG-DEMO",
      "order": "SO-104",
      "delivery": "DO-104-1",
      "version": 1,
      "sku": "SKU-A",
      "quantity": 60,
      "unit_price": 100000,
      "source_confirmed": true
    },
    {
      "event": "EV-01",
      "org": "ORG-DEMO",
      "order": "SO-104",
      "delivery": "DO-104-1",
      "version": 1,
      "sku": "SKU-A",
      "quantity": 60,
      "unit_price": 100000,
      "source_confirmed": true
    },
    {
      "event": "EV-02",
      "org": "ORG-DEMO",
      "order": "SO-104",
      "delivery": "DO-104-1",
      "version": 1,
      "sku": "SKU-A",
      "quantity": 60,
      "unit_price": 100000,
      "source_confirmed": true
    },
    {
      "event": "EV-03",
      "org": "ORG-DEMO",
      "order": "SO-104",
      "delivery": "DO-104-2",
      "version": 1,
      "sku": "SKU-A",
      "quantity": 40,
      "unit_price": 100000,
      "source_confirmed": true
    },
    {
      "event": "EV-04",
      "org": "ORG-DEMO",
      "order": "SO-105",
      "delivery": "DO-105-1",
      "version": 1,
      "sku": "UNKNOWN",
      "quantity": 1,
      "unit_price": 100000,
      "source_confirmed": true
    },
    {
      "event": "EV-05",
      "org": "ORG-DEMO",
      "order": "SO-106",
      "delivery": "DO-106-1",
      "version": 1,
      "sku": "SKU-A",
      "quantity": 1,
      "unit_price": 100000,
      "source_confirmed": false
    },
    {
      "event": "EV-06",
      "org": "ORG-DEMO",
      "order": "SO-104",
      "delivery": "DO-104-1",
      "version": 1,
      "sku": "SKU-A",
      "quantity": 65,
      "unit_price": 100000,
      "source_confirmed": true
    }
  ],
  "rules": [
    "Hold unconfirmed source and unknown SKU",
    "Business key: organization/order/delivery/version",
    "Same key and payload returns prior simulated draft",
    "Same key with changed payload is held as conflict"
  ],
  "expected": {
    "drafts": 2,
    "units": 100,
    "base_value_idr": 10000000,
    "duplicates": 2,
    "held": 3,
    "posted_invoices": 0,
    "inventory_writes": 0
  },
  "verification": {
    "method": "local_sequential_rules_v1",
    "actual": {
      "drafts": 2,
      "units": 100,
      "base_value_idr": 10000000,
      "duplicates": 2,
      "held": 3,
      "posted_invoices": 0,
      "inventory_writes": 0
    },
    "matches_expected": true,
    "trace": [
      {
        "event": "EV-01",
        "business_key": "ORG-DEMO/SO-104/DO-104-1/1",
        "action": "drafts",
        "reason": "new_valid_operation"
      },
      {
        "event": "EV-01",
        "business_key": "ORG-DEMO/SO-104/DO-104-1/1",
        "action": "duplicates",
        "reason": "same_business_operation"
      },
      {
        "event": "EV-02",
        "business_key": "ORG-DEMO/SO-104/DO-104-1/1",
        "action": "duplicates",
        "reason": "same_business_operation"
      },
      {
        "event": "EV-03",
        "business_key": "ORG-DEMO/SO-104/DO-104-2/1",
        "action": "drafts",
        "reason": "new_valid_operation"
      },
      {
        "event": "EV-04",
        "business_key": "ORG-DEMO/SO-105/DO-105-1/1",
        "action": "held",
        "reason": "unknown_sku"
      },
      {
        "event": "EV-05",
        "business_key": "ORG-DEMO/SO-106/DO-106-1/1",
        "action": "held",
        "reason": "source_unconfirmed"
      },
      {
        "event": "EV-06",
        "business_key": "ORG-DEMO/SO-104/DO-104-1/1",
        "action": "held",
        "reason": "payload_conflict"
      }
    ]
  }
}