{
  "note": "Mivo | Split-shipment inventory test. Scenarios and expected results, as a checklist for a platform trial: not a program that connects to a platform. Public product name; fictional quantities, codes, suppliers, warehouses and times. Prepared by The AI Pipe.",
  "clock": "Scenario times are minutes since Day 1, 00:00; each is also given as text.",
  "startingPoint": {
    "text": "PO-1: 1,200 LiteForce. AIR-1, 240 by air to warehouse A, left Day 12, due Day 16: 180 received so far, in three receipts of 60, R-101 to R-103. SEA-1, 720 by sea to warehouse B, left Day 14, due Day 52. 240 not shipped. In A, 30 reserved and 12 damaged. Both warehouse feeds exchanged successfully at Day 16, 12:00.",
    "events": [
      {
        "id": "MAP-1",
        "at": 480,
        "type": "mapping_approved",
        "code": "OSMO-LF",
        "reference": "LITEFORCE",
        "atText": "Day 1, 08:00"
      },
      {
        "id": "MAP-2",
        "at": 485,
        "type": "mapping_approved",
        "code": "MIVO-LF",
        "reference": "LITEFORCE",
        "atText": "Day 1, 08:05"
      },
      {
        "id": "ORD-1",
        "at": 540,
        "type": "order_placed",
        "order": "PO-1",
        "reference": "LITEFORCE",
        "quantity": 1200,
        "atText": "Day 1, 09:00"
      },
      {
        "id": "DEP-AIR-1",
        "at": 16440,
        "type": "shipment_departed",
        "shipment": "AIR-1",
        "order": "PO-1",
        "mode": "air",
        "destination": "A",
        "quantity": 240,
        "eta": 22080,
        "atText": "Day 12, 10:00"
      },
      {
        "id": "DEP-SEA-1",
        "at": 19320,
        "type": "shipment_departed",
        "shipment": "SEA-1",
        "order": "PO-1",
        "mode": "sea",
        "destination": "B",
        "quantity": 720,
        "eta": 73920,
        "atText": "Day 14, 10:00"
      },
      {
        "id": "R-101",
        "at": 22152,
        "type": "receipt",
        "shipment": "AIR-1",
        "location": "A",
        "code": "MIVO-LF",
        "quantity": 60,
        "atText": "Day 16, 09:12"
      },
      {
        "id": "R-102",
        "at": 22180,
        "type": "receipt",
        "shipment": "AIR-1",
        "location": "A",
        "code": "MIVO-LF",
        "quantity": 60,
        "atText": "Day 16, 09:40"
      },
      {
        "id": "R-103",
        "at": 22205,
        "type": "receipt",
        "shipment": "AIR-1",
        "location": "A",
        "code": "MIVO-LF",
        "quantity": 60,
        "atText": "Day 16, 10:05"
      },
      {
        "id": "RES-1",
        "at": 22260,
        "type": "reserved",
        "location": "A",
        "quantity": 30,
        "atText": "Day 16, 11:00"
      },
      {
        "id": "DMG-1",
        "at": 22290,
        "type": "damaged",
        "location": "A",
        "quantity": 12,
        "atText": "Day 16, 11:30"
      },
      {
        "id": "SYNC-A-1",
        "at": 22320,
        "type": "feed_ok",
        "location": "A",
        "atText": "Day 16, 12:00"
      },
      {
        "id": "SYNC-B-1",
        "at": 22320,
        "type": "feed_ok",
        "location": "B",
        "atText": "Day 16, 12:00"
      }
    ]
  },
  "scenarios": [
    {
      "id": "lost-acknowledgement",
      "title": "The lost acknowledgement",
      "summary": "Receipt R-103 was applied, its acknowledgement never reached the warehouse system, and the system sends it again.",
      "steps": [
        {
          "label": "The retry",
          "whatHappens": "At Day 16, 12:05 the warehouse system sends receipt R-103 again: same identifier, same 60 units. The warehouse's own count for A, taken at the same instant, says 180.",
          "readAt": {
            "minutes": 22325,
            "text": "Day 16, 12:05"
          },
          "messages": [
            {
              "arrivedAt": {
                "minutes": 22325,
                "text": "Day 16, 12:05"
              },
              "event": {
                "id": "R-103",
                "at": 22205,
                "type": "receipt",
                "shipment": "AIR-1",
                "location": "A",
                "code": "MIVO-LF",
                "quantity": 60,
                "atText": "Day 16, 10:05"
              }
            }
          ],
          "warehouseRecord": {
            "location": "A",
            "asOf": 22325,
            "physical": 180,
            "receipts": [
              {
                "id": "R-101",
                "at": 22152,
                "shipment": "AIR-1",
                "code": "MIVO-LF",
                "quantity": 60
              },
              {
                "id": "R-102",
                "at": 22180,
                "shipment": "AIR-1",
                "code": "MIVO-LF",
                "quantity": 60
              },
              {
                "id": "R-103",
                "at": 22205,
                "shipment": "AIR-1",
                "code": "MIVO-LF",
                "quantity": 60
              }
            ]
          },
          "expected": [
            {
              "check": "Receipt R-103",
              "key": "outcome:R-103",
              "value": "duplicate",
              "text": "Already recorded"
            },
            {
              "check": "Recorded on hand in A",
              "key": "physical:A",
              "value": 180,
              "text": "180"
            },
            {
              "check": "Available in A",
              "key": "available:A",
              "value": 138,
              "text": "138"
            },
            {
              "check": "In transit on AIR-1",
              "key": "inTransit:AIR-1",
              "value": 60,
              "text": "60"
            },
            {
              "check": "Received on AIR-1",
              "key": "received:AIR-1",
              "value": 180,
              "text": "180"
            },
            {
              "check": "Total tracked for PO-1",
              "key": "positionsTotal:PO-1",
              "value": 1200,
              "text": "1,200"
            },
            {
              "check": "Warehouse count minus ledger",
              "key": "recon:difference",
              "value": 0,
              "text": "0"
            },
            {
              "check": "Reconciliation",
              "key": "recon:status",
              "value": "matched",
              "text": "Matched"
            }
          ]
        }
      ]
    },
    {
      "id": "identical-receipts",
      "title": "Two identical receipts, both real",
      "summary": "Same shipment, code, quantity and time, two identifiers: both count.",
      "steps": [
        {
          "label": "Two deliveries of six cartons",
          "whatHappens": "SEA-1 reaches B as two deliveries of six cartons, both received at Day 52, 09:00 and posted as R-201 and R-202. Shipment, code, quantity and time are the same; only the identifiers differ.",
          "readAt": {
            "minutes": 73982,
            "text": "Day 52, 09:02"
          },
          "messages": [
            {
              "arrivedAt": {
                "minutes": 73981,
                "text": "Day 52, 09:01"
              },
              "event": {
                "id": "R-201",
                "at": 73980,
                "type": "receipt",
                "shipment": "SEA-1",
                "location": "B",
                "code": "MIVO-LF",
                "quantity": 360,
                "atText": "Day 52, 09:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 73982,
                "text": "Day 52, 09:02"
              },
              "event": {
                "id": "R-202",
                "at": 73980,
                "type": "receipt",
                "shipment": "SEA-1",
                "location": "B",
                "code": "MIVO-LF",
                "quantity": 360,
                "atText": "Day 52, 09:00"
              }
            }
          ],
          "warehouseRecord": null,
          "expected": [
            {
              "check": "Receipt R-201",
              "key": "outcome:R-201",
              "value": "applied",
              "text": "Applied"
            },
            {
              "check": "Receipt R-202",
              "key": "outcome:R-202",
              "value": "applied",
              "text": "Applied"
            },
            {
              "check": "Recorded on hand in B",
              "key": "physical:B",
              "value": 720,
              "text": "720"
            },
            {
              "check": "Available in B",
              "key": "available:B",
              "value": 720,
              "text": "720"
            },
            {
              "check": "In transit on SEA-1",
              "key": "inTransit:SEA-1",
              "value": 0,
              "text": "0"
            },
            {
              "check": "Received on SEA-1",
              "key": "received:SEA-1",
              "value": 720,
              "text": "720"
            },
            {
              "check": "Total tracked for PO-1",
              "key": "positionsTotal:PO-1",
              "value": 1200,
              "text": "1,200"
            }
          ]
        }
      ]
    },
    {
      "id": "stale-feed",
      "title": "A warehouse feed goes stale",
      "summary": "No successful exchange from A for 26 hours; B has had no movement, and says so every hour.",
      "steps": [
        {
          "label": "26 hours of silence from A",
          "whatHappens": "From Day 16, 13:00 to Day 17, 14:00, every hourly exchange with A's feed fails, while B's succeeds and reports no movement. The 26 hours are a scenario duration; the 2-hour threshold is set by us.",
          "readAt": {
            "minutes": 23880,
            "text": "Day 17, 14:00"
          },
          "messages": [
            {
              "arrivedAt": {
                "minutes": 22380,
                "text": "Day 16, 13:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-1",
                "at": 22380,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 16, 13:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22380,
                "text": "Day 16, 13:00"
              },
              "event": {
                "id": "SYNC-B-2",
                "at": 22380,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 16, 13:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22440,
                "text": "Day 16, 14:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-2",
                "at": 22440,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 16, 14:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22440,
                "text": "Day 16, 14:00"
              },
              "event": {
                "id": "SYNC-B-3",
                "at": 22440,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 16, 14:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22500,
                "text": "Day 16, 15:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-3",
                "at": 22500,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 16, 15:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22500,
                "text": "Day 16, 15:00"
              },
              "event": {
                "id": "SYNC-B-4",
                "at": 22500,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 16, 15:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22560,
                "text": "Day 16, 16:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-4",
                "at": 22560,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 16, 16:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22560,
                "text": "Day 16, 16:00"
              },
              "event": {
                "id": "SYNC-B-5",
                "at": 22560,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 16, 16:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22620,
                "text": "Day 16, 17:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-5",
                "at": 22620,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 16, 17:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22620,
                "text": "Day 16, 17:00"
              },
              "event": {
                "id": "SYNC-B-6",
                "at": 22620,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 16, 17:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22680,
                "text": "Day 16, 18:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-6",
                "at": 22680,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 16, 18:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22680,
                "text": "Day 16, 18:00"
              },
              "event": {
                "id": "SYNC-B-7",
                "at": 22680,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 16, 18:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22740,
                "text": "Day 16, 19:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-7",
                "at": 22740,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 16, 19:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22740,
                "text": "Day 16, 19:00"
              },
              "event": {
                "id": "SYNC-B-8",
                "at": 22740,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 16, 19:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22800,
                "text": "Day 16, 20:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-8",
                "at": 22800,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 16, 20:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22800,
                "text": "Day 16, 20:00"
              },
              "event": {
                "id": "SYNC-B-9",
                "at": 22800,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 16, 20:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22860,
                "text": "Day 16, 21:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-9",
                "at": 22860,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 16, 21:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22860,
                "text": "Day 16, 21:00"
              },
              "event": {
                "id": "SYNC-B-10",
                "at": 22860,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 16, 21:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22920,
                "text": "Day 16, 22:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-10",
                "at": 22920,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 16, 22:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22920,
                "text": "Day 16, 22:00"
              },
              "event": {
                "id": "SYNC-B-11",
                "at": 22920,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 16, 22:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22980,
                "text": "Day 16, 23:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-11",
                "at": 22980,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 16, 23:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22980,
                "text": "Day 16, 23:00"
              },
              "event": {
                "id": "SYNC-B-12",
                "at": 22980,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 16, 23:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23040,
                "text": "Day 17, 00:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-12",
                "at": 23040,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 17, 00:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23040,
                "text": "Day 17, 00:00"
              },
              "event": {
                "id": "SYNC-B-13",
                "at": 23040,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 17, 00:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23100,
                "text": "Day 17, 01:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-13",
                "at": 23100,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 17, 01:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23100,
                "text": "Day 17, 01:00"
              },
              "event": {
                "id": "SYNC-B-14",
                "at": 23100,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 17, 01:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23160,
                "text": "Day 17, 02:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-14",
                "at": 23160,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 17, 02:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23160,
                "text": "Day 17, 02:00"
              },
              "event": {
                "id": "SYNC-B-15",
                "at": 23160,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 17, 02:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23220,
                "text": "Day 17, 03:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-15",
                "at": 23220,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 17, 03:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23220,
                "text": "Day 17, 03:00"
              },
              "event": {
                "id": "SYNC-B-16",
                "at": 23220,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 17, 03:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23280,
                "text": "Day 17, 04:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-16",
                "at": 23280,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 17, 04:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23280,
                "text": "Day 17, 04:00"
              },
              "event": {
                "id": "SYNC-B-17",
                "at": 23280,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 17, 04:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23340,
                "text": "Day 17, 05:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-17",
                "at": 23340,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 17, 05:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23340,
                "text": "Day 17, 05:00"
              },
              "event": {
                "id": "SYNC-B-18",
                "at": 23340,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 17, 05:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23400,
                "text": "Day 17, 06:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-18",
                "at": 23400,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 17, 06:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23400,
                "text": "Day 17, 06:00"
              },
              "event": {
                "id": "SYNC-B-19",
                "at": 23400,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 17, 06:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23460,
                "text": "Day 17, 07:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-19",
                "at": 23460,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 17, 07:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23460,
                "text": "Day 17, 07:00"
              },
              "event": {
                "id": "SYNC-B-20",
                "at": 23460,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 17, 07:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23520,
                "text": "Day 17, 08:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-20",
                "at": 23520,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 17, 08:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23520,
                "text": "Day 17, 08:00"
              },
              "event": {
                "id": "SYNC-B-21",
                "at": 23520,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 17, 08:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23580,
                "text": "Day 17, 09:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-21",
                "at": 23580,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 17, 09:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23580,
                "text": "Day 17, 09:00"
              },
              "event": {
                "id": "SYNC-B-22",
                "at": 23580,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 17, 09:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23640,
                "text": "Day 17, 10:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-22",
                "at": 23640,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 17, 10:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23640,
                "text": "Day 17, 10:00"
              },
              "event": {
                "id": "SYNC-B-23",
                "at": 23640,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 17, 10:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23700,
                "text": "Day 17, 11:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-23",
                "at": 23700,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 17, 11:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23700,
                "text": "Day 17, 11:00"
              },
              "event": {
                "id": "SYNC-B-24",
                "at": 23700,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 17, 11:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23760,
                "text": "Day 17, 12:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-24",
                "at": 23760,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 17, 12:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23760,
                "text": "Day 17, 12:00"
              },
              "event": {
                "id": "SYNC-B-25",
                "at": 23760,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 17, 12:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23820,
                "text": "Day 17, 13:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-25",
                "at": 23820,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 17, 13:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23820,
                "text": "Day 17, 13:00"
              },
              "event": {
                "id": "SYNC-B-26",
                "at": 23820,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 17, 13:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23880,
                "text": "Day 17, 14:00"
              },
              "event": {
                "id": "SYNC-A-FAIL-26",
                "at": 23880,
                "type": "feed_failed",
                "location": "A",
                "atText": "Day 17, 14:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23880,
                "text": "Day 17, 14:00"
              },
              "event": {
                "id": "SYNC-B-27",
                "at": 23880,
                "type": "feed_ok",
                "location": "B",
                "atText": "Day 17, 14:00"
              }
            }
          ],
          "warehouseRecord": null,
          "expected": [
            {
              "check": "A read as current",
              "key": "current:A",
              "value": false,
              "text": "Not current"
            },
            {
              "check": "A last exchanged successfully",
              "key": "confirmedAt:A",
              "value": 22320,
              "text": "Day 16, 12:00"
            },
            {
              "check": "Hours since A last exchanged",
              "key": "hoursSinceConfirmed:A",
              "value": 26,
              "text": "26 h"
            },
            {
              "check": "Recorded on hand in A",
              "key": "physical:A",
              "value": 180,
              "text": "180"
            },
            {
              "check": "Available in A",
              "key": "available:A",
              "value": 138,
              "text": "138"
            },
            {
              "check": "B read as current",
              "key": "current:B",
              "value": true,
              "text": "Current"
            },
            {
              "check": "Last movement in B",
              "key": "lastMovement:B",
              "value": null,
              "text": "None"
            },
            {
              "check": "Available, and current",
              "key": "availableCurrent",
              "value": 0,
              "text": "0"
            },
            {
              "check": "In warehouses, not current",
              "key": "physicalNotCurrent",
              "value": 180,
              "text": "180"
            }
          ]
        },
        {
          "label": "Feed restored",
          "whatHappens": "At Day 17, 14:30 A's feed comes back and delivers what it held back: 8 units reserved at Day 17, 10:00, during the outage.",
          "readAt": {
            "minutes": 23910,
            "text": "Day 17, 14:30"
          },
          "messages": [
            {
              "arrivedAt": {
                "minutes": 23910,
                "text": "Day 17, 14:30"
              },
              "event": {
                "id": "RES-2",
                "at": 23640,
                "type": "reserved",
                "location": "A",
                "quantity": 8,
                "atText": "Day 17, 10:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 23910,
                "text": "Day 17, 14:30"
              },
              "event": {
                "id": "SYNC-A-2",
                "at": 23910,
                "type": "feed_ok",
                "location": "A",
                "atText": "Day 17, 14:30"
              }
            }
          ],
          "warehouseRecord": null,
          "expected": [
            {
              "check": "A read as current",
              "key": "current:A",
              "value": true,
              "text": "Current"
            },
            {
              "check": "Recorded on hand in A",
              "key": "physical:A",
              "value": 180,
              "text": "180"
            },
            {
              "check": "Reserved in A",
              "key": "reserved:A",
              "value": 38,
              "text": "38"
            },
            {
              "check": "Available in A",
              "key": "available:A",
              "value": 130,
              "text": "130"
            },
            {
              "check": "Available, and current",
              "key": "availableCurrent",
              "value": 130,
              "text": "130"
            },
            {
              "check": "In warehouses, not current",
              "key": "physicalNotCurrent",
              "value": 0,
              "text": "0"
            }
          ]
        }
      ]
    },
    {
      "id": "reconciliation",
      "title": "The ledger says 180, the warehouse says 190",
      "summary": "Two observations of A at the same instant disagree; the missing receipt is found and replayed.",
      "steps": [
        {
          "label": "Two observations disagree",
          "whatHappens": "At Day 16, 18:00 the warehouse's own count for A says 190. Its record lists R-104, 10 units received at 16:40, which never reached the ledger: the sender gave up after its retries.",
          "readAt": {
            "minutes": 22680,
            "text": "Day 16, 18:00"
          },
          "messages": [],
          "warehouseRecord": {
            "location": "A",
            "asOf": 22680,
            "physical": 190,
            "receipts": [
              {
                "id": "R-101",
                "at": 22152,
                "shipment": "AIR-1",
                "code": "MIVO-LF",
                "quantity": 60
              },
              {
                "id": "R-102",
                "at": 22180,
                "shipment": "AIR-1",
                "code": "MIVO-LF",
                "quantity": 60
              },
              {
                "id": "R-103",
                "at": 22205,
                "shipment": "AIR-1",
                "code": "MIVO-LF",
                "quantity": 60
              },
              {
                "id": "R-104",
                "at": 22600,
                "shipment": "AIR-1",
                "code": "MIVO-LF",
                "quantity": 10
              }
            ]
          },
          "expected": [
            {
              "check": "Recorded on hand in A",
              "key": "physical:A",
              "value": 180,
              "text": "180"
            },
            {
              "check": "Warehouse count minus ledger",
              "key": "recon:difference",
              "value": 10,
              "text": "+10"
            },
            {
              "check": "Missing from the ledger",
              "key": "recon:missing",
              "value": "R-104",
              "text": "R-104"
            },
            {
              "check": "Reconciliation",
              "key": "recon:status",
              "value": "explained",
              "text": "Difference explained"
            }
          ]
        },
        {
          "label": "Missing receipt replayed",
          "whatHappens": "R-104 is replayed from the warehouse's record, with its original identifier.",
          "readAt": {
            "minutes": 22690,
            "text": "Day 16, 18:10"
          },
          "messages": [
            {
              "arrivedAt": {
                "minutes": 22690,
                "text": "Day 16, 18:10"
              },
              "event": {
                "id": "R-104",
                "at": 22600,
                "type": "receipt",
                "shipment": "AIR-1",
                "location": "A",
                "code": "MIVO-LF",
                "quantity": 10,
                "atText": "Day 16, 16:40"
              }
            }
          ],
          "warehouseRecord": {
            "location": "A",
            "asOf": 22680,
            "physical": 190,
            "receipts": [
              {
                "id": "R-101",
                "at": 22152,
                "shipment": "AIR-1",
                "code": "MIVO-LF",
                "quantity": 60
              },
              {
                "id": "R-102",
                "at": 22180,
                "shipment": "AIR-1",
                "code": "MIVO-LF",
                "quantity": 60
              },
              {
                "id": "R-103",
                "at": 22205,
                "shipment": "AIR-1",
                "code": "MIVO-LF",
                "quantity": 60
              },
              {
                "id": "R-104",
                "at": 22600,
                "shipment": "AIR-1",
                "code": "MIVO-LF",
                "quantity": 10
              }
            ]
          },
          "expected": [
            {
              "check": "Receipt R-104",
              "key": "outcome:R-104",
              "value": "applied",
              "text": "Applied"
            },
            {
              "check": "Recorded on hand in A",
              "key": "physical:A",
              "value": 190,
              "text": "190"
            },
            {
              "check": "In transit on AIR-1",
              "key": "inTransit:AIR-1",
              "value": 50,
              "text": "50"
            },
            {
              "check": "Total tracked for PO-1",
              "key": "positionsTotal:PO-1",
              "value": 1200,
              "text": "1,200"
            },
            {
              "check": "Warehouse count minus ledger",
              "key": "recon:difference",
              "value": 0,
              "text": "0"
            },
            {
              "check": "Reconciliation",
              "key": "recon:status",
              "value": "matched",
              "text": "Matched"
            }
          ]
        },
        {
          "label": "Replayed a second time",
          "whatHappens": "The same replay runs again, as a recovery procedure sometimes does.",
          "readAt": {
            "minutes": 22695,
            "text": "Day 16, 18:15"
          },
          "messages": [
            {
              "arrivedAt": {
                "minutes": 22695,
                "text": "Day 16, 18:15"
              },
              "event": {
                "id": "R-104",
                "at": 22600,
                "type": "receipt",
                "shipment": "AIR-1",
                "location": "A",
                "code": "MIVO-LF",
                "quantity": 10,
                "atText": "Day 16, 16:40"
              }
            }
          ],
          "warehouseRecord": {
            "location": "A",
            "asOf": 22680,
            "physical": 190,
            "receipts": [
              {
                "id": "R-101",
                "at": 22152,
                "shipment": "AIR-1",
                "code": "MIVO-LF",
                "quantity": 60
              },
              {
                "id": "R-102",
                "at": 22180,
                "shipment": "AIR-1",
                "code": "MIVO-LF",
                "quantity": 60
              },
              {
                "id": "R-103",
                "at": 22205,
                "shipment": "AIR-1",
                "code": "MIVO-LF",
                "quantity": 60
              },
              {
                "id": "R-104",
                "at": 22600,
                "shipment": "AIR-1",
                "code": "MIVO-LF",
                "quantity": 10
              }
            ]
          },
          "expected": [
            {
              "check": "Receipt R-104",
              "key": "outcome:R-104",
              "value": "duplicate",
              "text": "Already recorded"
            },
            {
              "check": "Recorded on hand in A",
              "key": "physical:A",
              "value": 190,
              "text": "190"
            },
            {
              "check": "Warehouse count minus ledger",
              "key": "recon:difference",
              "value": 0,
              "text": "0"
            }
          ]
        }
      ]
    },
    {
      "id": "excess-receipt",
      "title": "A receipt exceeds the remaining in-transit quantity",
      "summary": "80 units received against the 60 still in transit on AIR-1: held whole, pending verification; the stock does not move.",
      "steps": [
        {
          "label": "More than remains in transit",
          "whatHappens": "At Day 16, 14:00 the warehouse posts R-106: 80 units against AIR-1, which has 60 still in transit.",
          "readAt": {
            "minutes": 22440,
            "text": "Day 16, 14:00"
          },
          "messages": [
            {
              "arrivedAt": {
                "minutes": 22440,
                "text": "Day 16, 14:00"
              },
              "event": {
                "id": "R-106",
                "at": 22440,
                "type": "receipt",
                "shipment": "AIR-1",
                "location": "A",
                "code": "MIVO-LF",
                "quantity": 80,
                "atText": "Day 16, 14:00"
              }
            }
          ],
          "warehouseRecord": null,
          "expected": [
            {
              "check": "Receipt R-106",
              "key": "heldUnits:R-106",
              "value": 80,
              "text": "80 units held pending verification"
            },
            {
              "check": "Why R-106 is held",
              "key": "holdReason:R-106",
              "value": "exceeds_in_transit",
              "text": "More than remains in transit"
            },
            {
              "check": "Recorded on hand in A",
              "key": "physical:A",
              "value": 180,
              "text": "180"
            },
            {
              "check": "Last posted available in A",
              "key": "postedAvailable:A",
              "value": 138,
              "text": "138"
            },
            {
              "check": "In transit on AIR-1",
              "key": "inTransit:AIR-1",
              "value": 60,
              "text": "60"
            },
            {
              "check": "Messages held",
              "key": "anomalies",
              "value": 1,
              "text": "1"
            }
          ]
        },
        {
          "label": "Shipping information corrected",
          "whatHappens": "At Day 16, 15:00 the forwarder corrects AIR-1 from 240 to 260 units: 20 of the units recorded as not shipped had flown. The held receipt is checked again.",
          "readAt": {
            "minutes": 22500,
            "text": "Day 16, 15:00"
          },
          "messages": [
            {
              "arrivedAt": {
                "minutes": 22500,
                "text": "Day 16, 15:00"
              },
              "event": {
                "id": "COR-1",
                "at": 22500,
                "type": "shipment_corrected",
                "shipment": "AIR-1",
                "quantity": 260,
                "atText": "Day 16, 15:00"
              }
            }
          ],
          "warehouseRecord": null,
          "expected": [
            {
              "check": "Receipt R-106",
              "key": "outcome:R-106",
              "value": "released",
              "text": "Applied on release"
            },
            {
              "check": "Not shipped on PO-1",
              "key": "notShipped:PO-1",
              "value": 220,
              "text": "220"
            },
            {
              "check": "Shipped on AIR-1",
              "key": "shipped:AIR-1",
              "value": 260,
              "text": "260"
            },
            {
              "check": "Recorded on hand in A",
              "key": "physical:A",
              "value": 260,
              "text": "260"
            },
            {
              "check": "Available in A",
              "key": "available:A",
              "value": 218,
              "text": "218"
            },
            {
              "check": "In transit on AIR-1",
              "key": "inTransit:AIR-1",
              "value": 0,
              "text": "0"
            },
            {
              "check": "Messages held",
              "key": "anomalies",
              "value": 0,
              "text": "0"
            },
            {
              "check": "Total tracked for PO-1",
              "key": "positionsTotal:PO-1",
              "value": 1200,
              "text": "1,200"
            }
          ]
        }
      ]
    },
    {
      "id": "transfer",
      "title": "A transfer from A to B",
      "summary": "50 units in transit between warehouses: never available on the way, never a new supplier receipt.",
      "steps": [
        {
          "label": "Transfer sent",
          "whatHappens": "At Day 16, 14:00, 50 available units leave A for B as transfer T-1.",
          "readAt": {
            "minutes": 22440,
            "text": "Day 16, 14:00"
          },
          "messages": [
            {
              "arrivedAt": {
                "minutes": 22440,
                "text": "Day 16, 14:00"
              },
              "event": {
                "id": "TRS-1",
                "at": 22440,
                "type": "transfer_sent",
                "transfer": "T-1",
                "from": "A",
                "to": "B",
                "quantity": 50,
                "atText": "Day 16, 14:00"
              }
            }
          ],
          "warehouseRecord": null,
          "expected": [
            {
              "check": "Recorded on hand in A",
              "key": "physical:A",
              "value": 130,
              "text": "130"
            },
            {
              "check": "Available in A",
              "key": "available:A",
              "value": 88,
              "text": "88"
            },
            {
              "check": "Transfers in transit",
              "key": "transfersInTransit",
              "value": 50,
              "text": "50"
            },
            {
              "check": "Recorded on hand in B",
              "key": "physical:B",
              "value": 0,
              "text": "0"
            },
            {
              "check": "Received against PO-1, all shipments",
              "key": "receivedAgainst:PO-1",
              "value": 180,
              "text": "180"
            },
            {
              "check": "Total tracked for PO-1",
              "key": "positionsTotal:PO-1",
              "value": 1200,
              "text": "1,200"
            }
          ]
        },
        {
          "label": "Transfer received",
          "whatHappens": "At Day 17, 09:00, B receives the 50 units of T-1.",
          "readAt": {
            "minutes": 23580,
            "text": "Day 17, 09:00"
          },
          "messages": [
            {
              "arrivedAt": {
                "minutes": 23580,
                "text": "Day 17, 09:00"
              },
              "event": {
                "id": "TRR-1",
                "at": 23580,
                "type": "transfer_received",
                "transfer": "T-1",
                "location": "B",
                "quantity": 50,
                "atText": "Day 17, 09:00"
              }
            }
          ],
          "warehouseRecord": null,
          "expected": [
            {
              "check": "Recorded on hand in B",
              "key": "physical:B",
              "value": 50,
              "text": "50"
            },
            {
              "check": "Available in B",
              "key": "available:B",
              "value": 50,
              "text": "50"
            },
            {
              "check": "Transfers in transit",
              "key": "transfersInTransit",
              "value": 0,
              "text": "0"
            },
            {
              "check": "Received against PO-1, all shipments",
              "key": "receivedAgainst:PO-1",
              "value": 180,
              "text": "180"
            },
            {
              "check": "In transit on SEA-1",
              "key": "inTransit:SEA-1",
              "value": 720,
              "text": "720"
            },
            {
              "check": "Total tracked for PO-1",
              "key": "positionsTotal:PO-1",
              "value": 1200,
              "text": "1,200"
            }
          ]
        }
      ]
    },
    {
      "id": "sku-mapping",
      "title": "Two approved codes, one unknown",
      "summary": "OSMO-LF and MIVO-LF map to one product; MIVO-LF-B looks like them and is held, never matched by name.",
      "steps": [
        {
          "label": "Two codes arrive",
          "whatHappens": "At Day 16, 14:00, 20 units arrive under OSMO-LF, an approved alias. At 14:10, 20 more arrive under MIVO-LF-B, a code no one has approved. The codes are simulated; the rename from Osmo to Mivo only illustrates.",
          "readAt": {
            "minutes": 22450,
            "text": "Day 16, 14:10"
          },
          "messages": [
            {
              "arrivedAt": {
                "minutes": 22440,
                "text": "Day 16, 14:00"
              },
              "event": {
                "id": "R-107",
                "at": 22440,
                "type": "receipt",
                "shipment": "AIR-1",
                "location": "A",
                "code": "OSMO-LF",
                "quantity": 20,
                "atText": "Day 16, 14:00"
              }
            },
            {
              "arrivedAt": {
                "minutes": 22450,
                "text": "Day 16, 14:10"
              },
              "event": {
                "id": "R-108",
                "at": 22450,
                "type": "receipt",
                "shipment": "AIR-1",
                "location": "A",
                "code": "MIVO-LF-B",
                "quantity": 20,
                "atText": "Day 16, 14:10"
              }
            }
          ],
          "warehouseRecord": null,
          "expected": [
            {
              "check": "Receipt R-107",
              "key": "outcome:R-107",
              "value": "applied",
              "text": "Applied"
            },
            {
              "check": "Receipt R-108",
              "key": "heldUnits:R-108",
              "value": 20,
              "text": "20 units held pending verification"
            },
            {
              "check": "Why R-108 is held",
              "key": "holdReason:R-108",
              "value": "unknown_code",
              "text": "No approved mapping for this code"
            },
            {
              "check": "Recorded on hand in A",
              "key": "physical:A",
              "value": 200,
              "text": "200"
            },
            {
              "check": "In transit on AIR-1",
              "key": "inTransit:AIR-1",
              "value": 40,
              "text": "40"
            },
            {
              "check": "Messages held",
              "key": "anomalies",
              "value": 1,
              "text": "1"
            }
          ]
        },
        {
          "label": "Code approved by a person",
          "whatHappens": "At Day 16, 15:00 a person checks the packing list and approves MIVO-LF-B as LiteForce. The held receipt is checked again.",
          "readAt": {
            "minutes": 22500,
            "text": "Day 16, 15:00"
          },
          "messages": [
            {
              "arrivedAt": {
                "minutes": 22500,
                "text": "Day 16, 15:00"
              },
              "event": {
                "id": "MAP-3",
                "at": 22500,
                "type": "mapping_approved",
                "code": "MIVO-LF-B",
                "reference": "LITEFORCE",
                "atText": "Day 16, 15:00"
              }
            }
          ],
          "warehouseRecord": null,
          "expected": [
            {
              "check": "Receipt R-108",
              "key": "outcome:R-108",
              "value": "released",
              "text": "Applied on release"
            },
            {
              "check": "Recorded on hand in A",
              "key": "physical:A",
              "value": 220,
              "text": "220"
            },
            {
              "check": "In transit on AIR-1",
              "key": "inTransit:AIR-1",
              "value": 20,
              "text": "20"
            },
            {
              "check": "Messages held",
              "key": "anomalies",
              "value": 0,
              "text": "0"
            }
          ]
        }
      ]
    }
  ]
}