{
  "ursId": "URS-079",
  "title": "Cycle count surfaces expired stock for review and return",
  "timestamp": "2026-09-29T02:31:00.010Z",
  "durationMs": 68056,
  "config": {
    "inboxUrl": "http://localhost:33771",
    "dbHost": "localhost",
    "dbPort": 37173,
    "dbName": "cc_repinbox_dev"
  },
  "setup": {
    "status": "pass"
  },
  "scenarios": [
    {
      "name": "Step 1: Admin requests a cycle count of distributor trunk locations",
      "status": "pass",
      "description": "Step 1: Admin requests a cycle count of distributor trunk locations",
      "screenshots": [
        "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/screenshots/step-01-wizard-scope.png",
        "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/screenshots/step-01-review.png",
        "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/screenshots/step-01-submitted.png"
      ],
      "explanation": "Alex Admin (Vantis manufacturer) creates a cycle count request through the two-step wizard: the Corveta distributorship is selected with its scope narrowed to Trunks, then a due date and a URS-079 marker note are set on the review step. Submitting creates the request, links the resolved trunk locations, and pre-opens a cycle count at each (origin admin_request). This establishes the administrator-driven entry point of the pipeline under test.",
      "expectedAuditActions": [
        "cycle_count_request:create_cycle_count_request",
        "decision:create_cycle_count_request_item"
      ],
      "startedAt": "2026-09-29T02:31:13.052Z",
      "finishedAt": "2026-09-29T02:31:17.387Z",
      "videoPath": "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/videos/step-01-request.webm"
    },
    {
      "name": "Step 2: Rep opens the requested count and records the expired lot",
      "status": "pass",
      "description": "Step 2: Rep opens the requested count and records the expired lot",
      "screenshots": [
        "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/screenshots/step-02-scan-page.png",
        "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/screenshots/step-02-lot-recorded.png"
      ],
      "explanation": "Blair Bennett (Corveta rep) opens the request-created count from his trunk's location page and records the expired URS-079 NovaPatch lot through the Add items card's Form mode, picking the lot from the approved-lot dropdown (expired lots stay selectable — a count records what is physically on the shelf). The entry lands in the count's scan batch with its expiration resolved from the approved-lot catalog. This verifies a rep can record expired stock during a count.",
      "startedAt": "2026-09-29T02:31:26.030Z",
      "finishedAt": "2026-09-29T02:31:31.407Z",
      "videoPath": "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/videos/step-02-record.webm"
    },
    {
      "name": "Step 3: Rep finishes the cycle count",
      "status": "pass",
      "description": "Step 3: Rep finishes the cycle count",
      "screenshots": [
        "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/screenshots/step-03-finish-summary.png",
        "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/screenshots/step-03-finished.png"
      ],
      "explanation": "Blair confirms the finished count. finishCycleCount reconciles inventory to the counted quantities and then runs the lot-expiration scan inline, in the same transaction: the re-keyed inventory row keeps the expired date, so the scan raises the per-location \"Resolve expiring inventory\" review task, assigns the location-linked users plus Blair as the cycle counter, and records the ensure decision. This is the primary URS-079 evidence that finishing a count surfaces expired stock for review with no scheduled sweep needed.",
      "expectedAuditActions": [
        "decision:ensure_lot_expiration_checklist",
        "decision:ensure_lot_expiration_cycle_counter_assignment"
      ],
      "startedAt": "2026-09-29T02:31:38.453Z",
      "finishedAt": "2026-09-29T02:31:39.688Z",
      "videoPath": "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/videos/step-03-finish.webm"
    },
    {
      "name": "Step 4: The expiry review task appears in the rep inbox",
      "status": "pass",
      "description": "Step 4: The expiry review task appears in the rep inbox",
      "screenshots": [
        "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/screenshots/step-04-task-detail.png",
        "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/screenshots/step-04-go-to-task.png"
      ],
      "explanation": "The task raised by the count is waiting in Blair's inbox: the \"Resolve expiring inventory at TRUNK-36\" item lists the expired URS-079 lot on its detail panel with product, lot number, expiration, and status badge, and its \"Go to Task\" action is a deep link into the returns flow carrying manufacturerId, prefillExpiring=1, type=expiry, and the trunk's locationId. This verifies the review task reaches the person who performed the count with everything needed to act.",
      "startedAt": "2026-09-29T02:31:46.254Z",
      "finishedAt": "2026-09-29T02:31:46.366Z",
      "videoPath": "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/videos/step-04-inbox-task.webm"
    },
    {
      "name": "Step 5: The task deep-links into the prefilled expiry return flow",
      "status": "pass",
      "description": "Step 5: The task deep-links into the prefilled expiry return flow",
      "screenshots": [
        "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/screenshots/step-05-lots-preselected.png"
      ],
      "explanation": "Clicking \"Go to Task\" lands in the lean expiry returns flow at Step 2 of 3 (Lots): the type chooser and manufacturer step are skipped because the URL carries type=expiry and a valid manufacturerId, the form footer shows Vantis and the Expiring stock reason, and the picker arrives with the urgent lots pre-selected — including the expired URS-079 lot the count surfaced. This verifies the handoff from review task to return flow is prefilled end to end.",
      "startedAt": "2026-09-29T02:31:52.871Z",
      "finishedAt": "2026-09-29T02:31:52.871Z",
      "videoPath": "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/videos/step-05-deep-link.webm"
    },
    {
      "name": "Step 6: Rep submits the expiry return",
      "status": "pass",
      "description": "Step 6: Rep submits the expiry return",
      "screenshots": [
        "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/screenshots/step-06-review.png",
        "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/screenshots/step-06-submitted.png"
      ],
      "explanation": "Blair re-enters through the task, advances the prefilled flow to the review step, adds notes tagged with the URS-079 marker, and submits. The submit path creates a return with return_type=expiry, derives the return location from the selected lots, attaches no sales account, creates no replacement order, and fans the lot out into one return_items row per unit. Because the replacement-order step is skipped, the service writes a decision audit row (create_replacement_order_on_return, performed=false, reason=return_type_not_incident). This closes the pipeline: expired stock found by a count leaves through a fully traceable return.",
      "expectedAuditActions": [
        "decision:create_replacement_order_on_return"
      ],
      "startedAt": "2026-09-29T02:31:59.890Z",
      "finishedAt": "2026-09-29T02:32:06.803Z",
      "videoPath": "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/videos/step-06-submit.webm"
    }
  ],
  "dbValidations": [
    {
      "name": "Cycle count request created by the manufacturer admin",
      "query": "SELECT id, status, created_by_user_id, note, created_at\n    FROM cycle_count_requests\n    WHERE organization_id = $1 AND note LIKE '%' || $2 || '%'\n    ORDER BY created_at DESC",
      "status": "pass",
      "rows": [
        {
          "id": "01a0eb00-8d2c-7bea-8c92-1f397965a4d1",
          "status": "active",
          "created_by_user_id": "f6a7b8c9-d0e1-2345-f123-456789012345",
          "note": "URS-079 validation run — submitted at 2026-09-29T02:31:14.402Z",
          "created_at": "2026-09-29T02:31:17.058Z"
        }
      ],
      "assertion": "A cycle count request tagged \"URS-079 validation run\" should exist for Vantis, created by Alex Admin."
    },
    {
      "name": "Count at the trunk closed by the rep and applied",
      "query": "SELECT cc.id, cc.closed_at, cc.closed_by_user_id, cc.applied,\n      cc.metadata->>'origin' AS origin\n    FROM cycle_counts cc\n    WHERE cc.organization_id = $1\n      AND cc.location_id = $2\n      AND cc.metadata->>'requestId' = $3\n    ORDER BY cc.opened_at DESC",
      "status": "pass",
      "rows": [
        {
          "id": "01a0eb00-8d56-7baf-8070-224e479c3f17",
          "closed_at": "2026-09-29T02:31:39.308Z",
          "closed_by_user_id": "17b8c9d0-e1f2-3456-1234-567890123456",
          "applied": true,
          "origin": "admin_request"
        }
      ],
      "assertion": "The request-opened count at Blair's trunk should be closed by Blair, applied, with origin=admin_request."
    },
    {
      "name": "Reconciled lot kept its expiration and the return took the units",
      "query": "SELECT lot, SUM(quantity_ready)::int AS quantity, MIN(expiration::text) AS expiration\n    FROM inventory_items\n    WHERE organization_id = $1 AND real_world_location_id = $2 AND lot = $3\n    GROUP BY lot",
      "status": "pass",
      "rows": [
        {
          "lot": "URS079-NP-001",
          "quantity": 0,
          "expiration": "2026-09-19"
        }
      ],
      "assertion": "Lot URS079-NP-001 should still exist at Blair's trunk with a past, non-null expiration (proof it survived the reconcile re-key), and its ready quantity should be 0 because submitting the return moved every unit out."
    },
    {
      "name": "Lot-expiration review item raised for the counted trunk",
      "query": "SELECT id, status, route, item_key, metadata\n    FROM checklist_items\n    WHERE organization_id = $1 AND criteria_type = $2 AND linked_object_id = $3",
      "status": "pass",
      "rows": [
        {
          "id": "01a0eb00-e49c-78af-b5c9-bcc3d727a2c2",
          "status": "completed",
          "route": "/returns/new?manufacturerId=a1b2c3d4-e5f6-7890-abcd-ef1234567890&prefillExpiring=1&type=expiry&locationId=a6e7f8a9-b0c1-2345-0123-456789012345",
          "item_key": "lot-expiration-a6e7f8a9-b0c1-2345-0123-456789012345",
          "metadata": "{\"type\":\"lot_expiration_item\",\"raisedFor\":\"2026-09\",\"locationId\":\"a6e7f8a9-b0c1-2345-0123-456789012345\",\"urgentLots\":[{\"lot\":\"URS079-NP-001\",\"status\":\"expired\",\"expiration\":\"2026-09-19\",\"productSku\":\"NP019N1A\",\"locationName\":\"TRUNK-36\",\"productTitle\":\"NovaPatch® PET\",\"serialNumber\":null,\"daysRemaining\":-9,\"quantityReady\":4,\"manufacturerName\":\"Vantis\"}],\"locationName\":\"TRUNK-36\"}"
        }
      ],
      "assertion": "A inventory.lot_expiration_review checklist item should exist for Blair's trunk with lot URS079-NP-001 in its urgentLots metadata."
    },
    {
      "name": "Review item routes into the prefilled expiry return flow",
      "query": "-- route from the checklist item row above",
      "status": "pass",
      "rows": [
        {
          "route": "/returns/new?manufacturerId=a1b2c3d4-e5f6-7890-abcd-ef1234567890&prefillExpiring=1&type=expiry&locationId=a6e7f8a9-b0c1-2345-0123-456789012345"
        }
      ],
      "assertion": "With returns enabled and Vantis the only manufacturer with urgent lots at the trunk, the item route should be /returns/new?manufacturerId=<vantis>&prefillExpiring=1&type=expiry&locationId=<trunk>."
    },
    {
      "name": "Counting rep assigned to the review item",
      "query": "SELECT id, assignment_type, assigned_to_user_id, metadata\n    FROM checklist_assignments\n    WHERE checklist_item_id = $1\n      AND assignment_type = 'user'\n      AND assigned_to_user_id = $2",
      "status": "pass",
      "rows": [
        {
          "id": "01a0eb00-e49f-75c2-8575-1c1dfe044e09",
          "assignment_type": "user",
          "assigned_to_user_id": "17b8c9d0-e1f2-3456-1234-567890123456",
          "metadata": {}
        }
      ],
      "assertion": "Blair (who closed the count) should carry a user assignment on the review item — via the trunk's location linkage or the cycle_counter-origin assignment."
    },
    {
      "name": "Inline lot-expiration scan decision recorded",
      "query": "SELECT id, action, payload, created_at\n    FROM audit_events\n    WHERE created_at >= $1\n      AND event_type = 'decision'\n      AND action = 'ensure_lot_expiration_checklist'\n      AND payload->>'performed' = 'true'\n    ORDER BY created_at DESC",
      "status": "pass",
      "rows": [
        {
          "id": "01a0eb00-e4b1-793b-ae8e-eab363367013",
          "action": "ensure_lot_expiration_checklist",
          "payload": {
            "reason": "created_1_reopened_0_already_open_1_refreshed_1",
            "performed": true,
            "entityType": "organization"
          },
          "created_at": "2026-09-29T02:31:39.089Z"
        }
      ],
      "assertion": "Finishing the count should log a decision with action='ensure_lot_expiration_checklist' and performed=true in the run window."
    },
    {
      "name": "Expiry return submitted with the lean-flow shape",
      "query": "SELECT id, return_number, status, return_type, sales_account_id,\n      return_location_id, replacement_order_id, notes, created_at\n    FROM returns\n    WHERE sales_organization_id = $1\n      AND manufacturer_organization_id = $2\n      AND return_type = 'expiry'\n      AND notes LIKE '%' || $3 || '%'\n      AND created_at > NOW() - INTERVAL '2 hours'\n    ORDER BY created_at DESC",
      "status": "pass",
      "rows": [
        {
          "id": "01a0eb01-3c07-70b3-b45c-a4cf002bcb7b",
          "return_number": "RET-1",
          "status": "submitted",
          "return_type": "expiry",
          "sales_account_id": null,
          "return_location_id": "a6e7f8a9-b0c1-2345-0123-456789012345",
          "replacement_order_id": null,
          "notes": "URS-079 validation run — submitted at 2026-09-29T02:31:59.316Z",
          "created_at": "2026-09-29T02:32:01.757Z"
        }
      ],
      "assertion": "A URS-079 return with return_type=expiry and status=submitted should exist, with no replacement order, no sales account, and Blair's trunk as the derived return location."
    },
    {
      "name": "Return items fan out the expired lot per unit",
      "query": "SELECT ri.id, ri.lot_number, ri.manufacturer_organization_id, ri.location_id,\n      ri.expiration\n    FROM return_items ri\n    WHERE ri.return_id = $1 AND ri.lot_number = $2",
      "status": "pass",
      "rows": [
        {
          "id": "01a0eb01-3c0d-7f84-8e5a-51e8aee6a5dc",
          "lot_number": "URS079-NP-001",
          "manufacturer_organization_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "location_id": "a6e7f8a9-b0c1-2345-0123-456789012345",
          "expiration": "2026-09-19T00:00:00.000Z"
        },
        {
          "id": "01a0eb01-3c0d-7f84-8e5a-51e96fd98dcd",
          "lot_number": "URS079-NP-001",
          "manufacturer_organization_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "location_id": "a6e7f8a9-b0c1-2345-0123-456789012345",
          "expiration": "2026-09-19T00:00:00.000Z"
        },
        {
          "id": "01a0eb01-3c0d-7f84-8e5a-51ea591b09e7",
          "lot_number": "URS079-NP-001",
          "manufacturer_organization_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "location_id": "a6e7f8a9-b0c1-2345-0123-456789012345",
          "expiration": "2026-09-19T00:00:00.000Z"
        },
        {
          "id": "01a0eb01-3c0d-7f84-8e5a-51ebe6262493",
          "lot_number": "URS079-NP-001",
          "manufacturer_organization_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "location_id": "a6e7f8a9-b0c1-2345-0123-456789012345",
          "expiration": "2026-09-19T00:00:00.000Z"
        }
      ],
      "assertion": "The return should carry 4 return_items rows (one per unit) for lot URS079-NP-001, each with the Vantis manufacturer and the trunk location."
    },
    {
      "name": "Replacement-order skip recorded as an audit decision",
      "query": "SELECT id, event_type, action, payload, created_at\n    FROM audit_events\n    WHERE created_at >= $1\n      AND event_type = 'decision'\n      AND action = 'create_replacement_order_on_return'\n      AND payload->>'performed' = 'false'\n      AND payload->>'reason' = 'return_type_not_incident'\n    ORDER BY created_at DESC",
      "status": "pass",
      "rows": [
        {
          "id": "01a0eb01-3c42-7d63-a45d-82e0f8e753e9",
          "event_type": "decision",
          "action": "create_replacement_order_on_return",
          "payload": {
            "reason": "return_type_not_incident",
            "performed": false,
            "entityType": "return"
          },
          "created_at": "2026-09-29T02:32:01.757Z"
        }
      ],
      "assertion": "Submitting the expiry return should write a decision audit_events row with action='create_replacement_order_on_return', performed=false, reason='return_type_not_incident'."
    }
  ],
  "overallStatus": "pass",
  "outputDir": "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z",
  "auditStartTime": "2026-09-29T02:30:58.189Z",
  "emailEvidence": [
    {
      "subject": "Return Submitted - RET-1",
      "template": "Return_Submitted_-_RET-1",
      "screenshotPath": "/home/runner/_work/code/code/validation_test_results/urs-079-cycle-count-expiry-return/2026-09-29T02-31-00-009Z/screenshots/emails/2026-09-29T02-32-03-888Z-Return_Submitted_-_RET-1.png"
    }
  ],
  "auditEventEvidence": [
    {
      "createdAt": "2026-09-29T02:31:05.240Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "alex.admin@vantismedical.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "alex.admin@vantismedical.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-09-29T02:31:17.023Z",
      "eventType": "decision",
      "action": "create_cycle_count_request_item",
      "userEmail": "alex.admin@vantismedical.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb00-8d7a-7724-a119-e0ad62eca8bf",
      "secondaryObjectId": "01a0eb00-8d2c-7bea-8c92-1f397965a4d1",
      "payload": {
        "reason": "assigned_trunk_owner",
        "performed": true,
        "entityType": "checklist_item",
        "locationId": "a6e7f8a9-b0c1-2345-0123-456789012345",
        "checklistId": "01a0eb00-8d6d-783f-9ff9-3e64feb693d7",
        "inventoryId": "fa000001-0000-4000-8000-000000000001",
        "cycleCountId": "01a0eb00-8d56-7baf-8070-224e479c3f17",
        "locationType": "trunk_stock",
        "assigneeCount": 1,
        "assigneeResolutionReason": null
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:17.023Z",
      "eventType": "decision",
      "action": "create_cycle_count_request_item",
      "userEmail": "alex.admin@vantismedical.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb00-8d7b-7c18-90f3-7ad6b9dfe347",
      "secondaryObjectId": "01a0eb00-8d2c-7bea-8c92-1f397965a4d1",
      "payload": {
        "reason": "assigned_shared_inventory_team",
        "performed": true,
        "entityType": "checklist_item",
        "locationId": "01a0eb00-37a0-739c-9b30-a707c8e918a1",
        "checklistId": "01a0eb00-8d6d-783f-9ff9-3e64feb693d7",
        "inventoryId": "fa000001-0000-4000-8000-000000000001",
        "cycleCountId": "01a0eb00-8d5a-7317-b956-fb5e2d6686c9",
        "locationType": "shared_inventory",
        "assigneeCount": 1,
        "assigneeResolutionReason": null
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:17.023Z",
      "eventType": "decision",
      "action": "refresh_unassigned_cycle_counts_review_item",
      "userEmail": "alex.admin@vantismedical.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "secondaryObjectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "payload": {
        "reason": "no_unassigned_locations",
        "performed": false,
        "entityType": "organization",
        "unassignedCount": 0
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:17.023Z",
      "eventType": "checklist",
      "action": "checklists.create",
      "userEmail": "alex.admin@vantismedical.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb00-8d6d-783f-9ff9-3e64feb693d7",
      "secondaryObjectId": null,
      "payload": {
        "title": "Cycle Count Request — Oct 6, 2026",
        "source": {
          "scope": "admin_request",
          "feature": "cycle_counts"
        }
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:17.023Z",
      "eventType": "decision",
      "action": "auto_complete_cycle_count_request",
      "userEmail": "alex.admin@vantismedical.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb00-8d2c-7bea-8c92-1f397965a4d1",
      "secondaryObjectId": "01a0eb00-8d51-7fdb-b021-9fc5625bdfcd",
      "payload": {
        "reason": "request_has_incomplete_cycle_counts",
        "performed": false,
        "entityType": "cycle_count_request"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:17.023Z",
      "eventType": "cycle_count_request",
      "action": "create_cycle_count_request",
      "userEmail": "alex.admin@vantismedical.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb00-8d2c-7bea-8c92-1f397965a4d1",
      "secondaryObjectId": null,
      "payload": {
        "name": "Cycle count request - Sep 29, 2026, 2:31 AM",
        "dueDate": "2026-10-06",
        "noteLength": 62,
        "checklistIds": [
          "01a0eb00-8d6d-783f-9ff9-3e64feb693d7"
        ],
        "totalLocationCount": 3,
        "reusedCycleCountIds": [],
        "skipSharedInventory": false,
        "supersededRequestIds": [],
        "locationInventoryPairs": [
          {
            "locationId": "b7f8a9b0-c1d2-3456-1234-567890123456",
            "inventoryId": "fa000001-0000-4000-8000-000000000001",
            "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
          },
          {
            "locationId": "a6e7f8a9-b0c1-2345-0123-456789012345",
            "inventoryId": "fa000001-0000-4000-8000-000000000001",
            "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
          },
          {
            "locationId": "01a0eb00-37a0-739c-9b30-a707c8e918a1",
            "inventoryId": "fa000001-0000-4000-8000-000000000001",
            "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
          }
        ]
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:17.023Z",
      "eventType": "decision",
      "action": "create_cycle_count_request_item",
      "userEmail": "alex.admin@vantismedical.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb00-8d77-7e33-a348-1667de93b617",
      "secondaryObjectId": "01a0eb00-8d2c-7bea-8c92-1f397965a4d1",
      "payload": {
        "reason": "assigned_trunk_owner",
        "performed": true,
        "entityType": "checklist_item",
        "locationId": "b7f8a9b0-c1d2-3456-1234-567890123456",
        "checklistId": "01a0eb00-8d6d-783f-9ff9-3e64feb693d7",
        "inventoryId": "fa000001-0000-4000-8000-000000000001",
        "cycleCountId": "01a0eb00-8d51-7fdb-b021-9fc5625bdfcd",
        "locationType": "trunk_stock",
        "assigneeCount": 1,
        "assigneeResolutionReason": null
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:20.394Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "blair.bennett@corvetasurgical.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-09-29T02:31:33.948Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "blair.bennett@corvetasurgical.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-09-29T02:31:39.089Z",
      "eventType": "decision",
      "action": "ensure_lot_expiration_cycle_counter_assignment",
      "userEmail": null,
      "userId": null,
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "a6e7f8a9-b0c1-2345-0123-456789012345",
      "secondaryObjectId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "payload": {
        "reason": "cycle_counter_already_among_assignees",
        "performed": false,
        "entityType": "real_world_location"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:39.089Z",
      "eventType": "decision",
      "action": "inventory.gate_cycle_count_evidence_photos",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb00-8d56-7baf-8070-224e479c3f17",
      "secondaryObjectId": null,
      "payload": {
        "reason": "requirement_not_active",
        "performed": false,
        "entityType": "cycle_count",
        "locationId": "a6e7f8a9-b0c1-2345-0123-456789012345",
        "inventoryId": "fa000001-0000-4000-8000-000000000001"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:39.089Z",
      "eventType": "decision",
      "action": "cycleCount.excludeSequesteredReturnUnits",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb00-8d56-7baf-8070-224e479c3f17",
      "secondaryObjectId": null,
      "payload": {
        "reason": "No open return movement holds units at the location",
        "performed": false,
        "entityType": "cycleCount",
        "exclusions": [],
        "locationId": "a6e7f8a9-b0c1-2345-0123-456789012345",
        "inventoryId": "fa000001-0000-4000-8000-000000000001",
        "sequesteredLineCount": 0
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:39.089Z",
      "eventType": "decision",
      "action": "refresh_unassigned_cycle_counts_review_item",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "secondaryObjectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "payload": {
        "reason": "no_unassigned_locations",
        "performed": false,
        "entityType": "organization",
        "unassignedCount": 0
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:39.089Z",
      "eventType": "checklist",
      "action": "checklists.create",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb00-e498-7900-adee-6c59624bd904",
      "secondaryObjectId": null,
      "payload": {
        "title": "Lot expiration review (1 location needs attention)",
        "source": {
          "type": "lot_expiration",
          "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
        }
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:39.089Z",
      "eventType": "decision",
      "action": "finish_cycle_count",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb00-8d56-7baf-8070-224e479c3f17",
      "secondaryObjectId": "a6e7f8a9-b0c1-2345-0123-456789012345",
      "payload": {
        "reason": "count_open",
        "performed": true,
        "entityType": "cycle_count",
        "inventoryId": "fa000001-0000-4000-8000-000000000001",
        "includeDeliveredPackages": true
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:39.089Z",
      "eventType": "decision",
      "action": "auto_complete_cycle_count_request",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb00-8d2c-7bea-8c92-1f397965a4d1",
      "secondaryObjectId": "01a0eb00-8d56-7baf-8070-224e479c3f17",
      "payload": {
        "reason": "request_has_incomplete_cycle_counts",
        "performed": false,
        "entityType": "cycle_count_request"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:39.089Z",
      "eventType": "decision",
      "action": "tickets.checklist_item_resolve.auto_resolve_ticket",
      "userEmail": null,
      "userId": null,
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb00-8d7a-7724-a119-e0ad62eca8bf",
      "secondaryObjectId": null,
      "payload": {
        "reason": "Checklist item is not linked to any ticket.",
        "newState": "completed",
        "oldState": "ready",
        "performed": false,
        "entityType": "checklist_item"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:39.089Z",
      "eventType": "decision",
      "action": "ensure_lot_expiration_checklist",
      "userEmail": null,
      "userId": null,
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "secondaryObjectId": null,
      "payload": {
        "reason": "created_1_reopened_0_already_open_1_refreshed_1",
        "performed": true,
        "entityType": "organization"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:39.089Z",
      "eventType": "decision",
      "action": "upgrade_lot_expiration_checklist_priority",
      "userEmail": null,
      "userId": null,
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_open_checklists_below_high",
        "performed": false,
        "entityType": "organization"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:39.089Z",
      "eventType": "decision",
      "action": "ensure_lot_expiration_cycle_counter_assignment",
      "userEmail": null,
      "userId": null,
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "b7f8a9b0-c1d2-3456-1234-567890123456",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_latest_cycle_counter",
        "performed": false,
        "entityType": "real_world_location",
        "checklistItemId": "01a0eb00-21aa-7caf-8947-0a69c7608e25"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:39.463Z",
      "eventType": "user_log",
      "action": "cycle_count:close",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb00-8d56-7baf-8070-224e479c3f17",
      "secondaryObjectId": "a6e7f8a9-b0c1-2345-0123-456789012345",
      "payload": {
        "inventoryId": "fa000001-0000-4000-8000-000000000001"
      },
      "route": "/inventory/locations/[locationId]/cycle_count/[cycleCountId]/scan",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-09-29T02:31:42.064Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "blair.bennett@corvetasurgical.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-09-29T02:31:48.465Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "blair.bennett@corvetasurgical.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-09-29T02:31:54.585Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "blair.bennett@corvetasurgical.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-09-29T02:32:01.757Z",
      "eventType": "decision",
      "action": "partition_return_submission",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-3c07-70b3-b45c-a4cf002bcb7b",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_org_submission_policy",
        "itemCount": 4,
        "performed": false,
        "entityType": "return",
        "submissionGroupId": "01a0eb01-3bfb-7d70-91fa-6a94eb716494"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:01.757Z",
      "eventType": "decision",
      "action": "create_replacement_order_on_return",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-3c07-70b3-b45c-a4cf002bcb7b",
      "secondaryObjectId": null,
      "payload": {
        "reason": "return_type_not_incident",
        "performed": false,
        "entityType": "return"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:01.757Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "return",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:01.757Z",
      "eventType": "decision",
      "action": "open_item_movement_on_return_submission",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb01-3c07-70b3-b45c-a4cf002bcb7b",
      "secondaryObjectId": null,
      "payload": {
        "reason": "return_movement_opened",
        "performed": true,
        "entityType": "return",
        "itemBatchId": "01a0eb01-3c19-70f3-b84c-4366134ed584",
        "movementIds": [
          "01a0eb01-3c12-73df-8e54-d1e4d2523071"
        ],
        "movedQuantity": 4,
        "createdQuantity": 0,
        "matchedQuantity": 4,
        "skippedLineCount": 0,
        "skippedReasonCounts": {}
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:01.757Z",
      "eventType": "decision",
      "action": "link_return_to_location_sales_account",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb01-3c07-70b3-b45c-a4cf002bcb7b",
      "secondaryObjectId": null,
      "payload": {
        "reason": "location_not_account_linked",
        "performed": false,
        "entityType": "return",
        "salesAccountId": null,
        "returnLocationId": "a6e7f8a9-b0c1-2345-0123-456789012345"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:01.757Z",
      "eventType": "decision",
      "action": "tickets.checklist_item_resolve.auto_resolve_ticket",
      "userEmail": null,
      "userId": null,
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb00-e49c-78af-b5c9-bcc3d727a2c2",
      "secondaryObjectId": null,
      "payload": {
        "reason": "Checklist item is not linked to any ticket.",
        "newState": "completed",
        "oldState": "ready",
        "performed": false,
        "entityType": "checklist_item"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:01.757Z",
      "eventType": "return_request",
      "action": "created",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-3c07-70b3-b45c-a4cf002bcb7b",
      "secondaryObjectId": null,
      "payload": {
        "itemCount": 4,
        "itemBatchId": "01a0eb01-3c19-70f3-b84c-4366134ed584",
        "returnNumber": "RET-1",
        "movedQuantity": 4,
        "noExpirationCount": 0,
        "salesOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        "reportedExpirationCount": 0,
        "manufacturerOrganizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:03.657Z",
      "eventType": "decision",
      "action": "returns.notifications.cc_incident_recipients",
      "userEmail": null,
      "userId": null,
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-3c07-70b3-b45c-a4cf002bcb7b",
      "secondaryObjectId": null,
      "payload": {
        "reason": "return is not an incident return",
        "performed": false,
        "entityType": "return"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:03.682Z",
      "eventType": "decision",
      "action": "extensiv_return_push.skipped",
      "userEmail": null,
      "userId": null,
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-3c07-70b3-b45c-a4cf002bcb7b",
      "secondaryObjectId": null,
      "payload": {
        "flags": {
          "wms_integrations": false,
          "extensiv_wms_integration": false
        },
        "reason": "wms_feature_flag_disabled",
        "performed": false,
        "entityType": "return",
        "triggerReason": "return_submitted"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:03.958Z",
      "eventType": "transactional_email",
      "action": "return_submitted",
      "userEmail": null,
      "userId": null,
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb01-3c07-70b3-b45c-a4cf002bcb7b",
      "secondaryObjectId": null,
      "payload": {
        "to": [
          "blair.bennett@corvetasurgical.com"
        ],
        "s3Path": "email-audit/b2c3d4e5-f6a7-8901-bcde-f12345678901/01a0eb01-444c-72ee-9412-62e4aea0fbd1/",
        "subject": "Return Submitted - RET-1",
        "messageId": "dev-console-log",
        "attachmentFiles": [
          {
            "s3Key": "email-audit/b2c3d4e5-f6a7-8901-bcde-f12345678901/01a0eb01-444c-72ee-9412-62e4aea0fbd1/attachments/1-RET-1-return-form-2026-09-29.pdf",
            "filename": "RET-1-return-form-2026-09-29.pdf"
          }
        ],
        "relatedEntityType": "return"
      },
      "route": null,
      "traceId": null
    }
  ],
  "auditQuery": "SELECT\n    ae.created_at,\n    ae.event_type,\n    ae.action,\n    ae.user_id,\n    u.email AS user_email,\n    ae.organization_id,\n    o.name AS organization_name,\n    ae.object_id,\n    ae.secondary_object_id,\n    ae.payload,\n    ae.route,\n    ae.trace_id\n  FROM audit_events ae\n  LEFT JOIN users u ON u.id = ae.user_id\n  LEFT JOIN organizations o ON o.id = ae.organization_id\n  WHERE ae.created_at >= $1\n    AND ae.organization_id = ANY($2::uuid[])\n  ORDER BY ae.created_at ASC",
  "auditAssertions": [
    {
      "stepName": "Step 1: Admin requests a cycle count of distributor trunk locations",
      "expectedAction": "cycle_count_request:create_cycle_count_request",
      "found": true
    },
    {
      "stepName": "Step 1: Admin requests a cycle count of distributor trunk locations",
      "expectedAction": "decision:create_cycle_count_request_item",
      "found": true
    },
    {
      "stepName": "Step 3: Rep finishes the cycle count",
      "expectedAction": "decision:ensure_lot_expiration_checklist",
      "found": true
    },
    {
      "stepName": "Step 3: Rep finishes the cycle count",
      "expectedAction": "decision:ensure_lot_expiration_cycle_counter_assignment",
      "found": true
    },
    {
      "stepName": "Step 6: Rep submits the expiry return",
      "expectedAction": "decision:create_replacement_order_on_return",
      "found": true
    }
  ],
  "emailAssertions": []
}