{
  "ursId": "URS-061",
  "title": "LOT policy defined per product with dropdown",
  "timestamp": "2026-04-23T03:43:54.023Z",
  "durationMs": 122345,
  "config": {
    "inboxUrl": "http://localhost:65101",
    "dbHost": "localhost",
    "dbPort": 65102,
    "dbName": "cc_repinbox_dev"
  },
  "setup": {
    "status": "pass"
  },
  "scenarios": [
    {
      "name": "Step 1: Open Products list",
      "status": "pass",
      "description": "Step 1: Open Products list",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-01-logged-in.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-01-products-list.png"
      ],
      "explanation": "A ZuriMED admin logs in and opens the Products settings page. This confirms that the product management interface is accessible and that the products list renders for an admin user.",
      "startedAt": "2026-04-23T03:43:58.809Z",
      "finishedAt": "2026-04-23T03:43:59.861Z",
      "videoPath": "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/videos/step-01-open-products.webm"
    },
    {
      "name": "Step 2: Open Product A",
      "status": "pass",
      "description": "Step 2: Open Product A",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-02-product-a-page.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-02-tracking-policy-default.png"
      ],
      "explanation": "The admin navigates to the SpeedPatch product settings page and confirms the Tracking Policy field is visible and set to \"Any Lot\" by default. This establishes the initial state before any policy change.",
      "startedAt": "2026-04-23T03:44:07.763Z",
      "finishedAt": "2026-04-23T03:44:07.851Z",
      "videoPath": "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/videos/step-02-open-product-a.webm"
    },
    {
      "name": "Step 3: All policy options visible",
      "status": "pass",
      "description": "Step 3: All policy options visible",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-03-tracking-policy-options-visible.png"
      ],
      "explanation": "The admin opens the Tracking Policy dropdown and confirms all four policy options are available: \"Any Lot\", \"Approved Lots Only\", \"No Lot\", and \"Use Serial Numbers\". This demonstrates that the system supports multiple per-product tracking policies.",
      "startedAt": "2026-04-23T03:44:16.315Z",
      "finishedAt": "2026-04-23T03:44:16.315Z",
      "videoPath": "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/videos/step-03-tracking-policy-options.webm"
    },
    {
      "name": "Step 4a: Approved Lots Only selected",
      "status": "pass",
      "description": "Step 4a: Approved Lots Only selected",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-04-policy-approved-selected.png"
      ],
      "explanation": "The \"Approved Lots Only\" policy is selected for Product A (SpeedPatch), changing the lot tracking mode from free-text entry to a managed dropdown of pre-approved lot values.",
      "startedAt": "2026-04-23T03:44:26.875Z",
      "finishedAt": "2026-04-23T03:44:26.875Z"
    },
    {
      "name": "Step 4b: Approved policy saved",
      "status": "pass",
      "description": "Step 4b: Approved policy saved",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-04-policy-saved.png"
      ],
      "explanation": "The product form is saved and the page reloads, confirming that the \"Approved Lots Only\" policy is persisted for Product A. A Configured Lots section now appears so approved lot values can be added.",
      "expectedAuditActions": [
        "decision:product.lot_policy.update"
      ],
      "startedAt": "2026-04-23T03:44:28.147Z",
      "finishedAt": "2026-04-23T03:44:28.147Z"
    },
    {
      "name": "Step 5: Add approved lots",
      "status": "pass",
      "description": "Step 5: Add approved lots",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-05-first-allowed-lot-added.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-05-both-allowed-lots-added.png"
      ],
      "explanation": "Two approved lot values (URS061-BATCH-2025-Q1 and URS061-BATCH-2025-Q2) are added to Product A. Only these values will be available in the lot dropdown when creating an order for this product.",
      "expectedAuditActions": [
        "decision:product.allowed_lot.add"
      ],
      "startedAt": "2026-04-23T03:44:38.365Z",
      "finishedAt": "2026-04-23T03:44:39.607Z",
      "videoPath": "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/videos/step-05-add-approved-lots.webm"
    },
    {
      "name": "Step 6: Product B default policy",
      "status": "pass",
      "description": "Step 6: Product B default policy",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-06-product-b-any-lot.png"
      ],
      "explanation": "Product B (FiberLocker) is confirmed to still have the default \"Any Lot\" policy, providing a contrast that demonstrates policies are tracked per product independently.",
      "startedAt": "2026-04-23T03:44:46.400Z",
      "finishedAt": "2026-04-23T03:44:46.400Z",
      "videoPath": "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/videos/step-06-product-b-default.webm"
    },
    {
      "name": "Step 7: LOT enforcement",
      "status": "pass",
      "description": "Step 7: LOT enforcement",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-07-devices-used-after-quantity.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-07-approved-lots-dropdown-open.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-07-approved-lot-selected.png"
      ],
      "explanation": "A sales rep starts a bill-only order and adds both products. SpeedPatch (Approved Lots Only) renders a dropdown restricted to the two configured lot values, while FiberLocker (Any Lot) renders a free-text input. This confirms the per-product LOT policy drives the downstream UI.",
      "startedAt": "2026-04-23T03:44:58.598Z",
      "finishedAt": "2026-04-23T03:45:06.732Z",
      "videoPath": "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/videos/step-07-order-enforcement.webm"
    },
    {
      "name": "Step 8: No Lot policy suppresses lot input",
      "status": "pass",
      "description": "Step 8: No Lot policy suppresses lot input",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-08-no-lot-policy-saved.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-08-no-lot-order-ui.png"
      ],
      "explanation": "Product A is switched to the \"No Lot\" policy. When a sales rep adds SpeedPatch to a bill-only order, no lot or serial field is rendered on the SpeedPatch row. FiberLocker (still \"Any Lot\") continues to render its free-text lot input, confirming each product's policy is evaluated independently at order-entry time.",
      "expectedAuditActions": [
        "decision:product.lot_policy.update"
      ],
      "startedAt": "2026-04-23T03:45:14.547Z",
      "finishedAt": "2026-04-23T03:45:24.124Z"
    },
    {
      "name": "Step 9: Serial Numbers policy shows serial input",
      "status": "pass",
      "description": "Step 9: Serial Numbers policy shows serial input",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-09-serial-policy-saved.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-09-serial-order-ui.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/screenshots/step-09-approved-policy-restored.png"
      ],
      "explanation": "Product A is switched to the \"Use Serial Numbers\" policy. When the sales rep adds SpeedPatch to a bill-only order, the lot input is replaced with a serial-number input (placeholder \"Enter serial number...\"). After the evidence is captured, Product A is restored to \"Approved Lots Only\" so the final database validation phase matches the persisted state established in Steps 4–5.",
      "expectedAuditActions": [
        "decision:product.lot_policy.update"
      ],
      "startedAt": "2026-04-23T03:45:35.219Z",
      "finishedAt": "2026-04-23T03:45:56.226Z"
    }
  ],
  "dbValidations": [
    {
      "name": "Product A (SpeedPatch) lot_policy = \"approved\"",
      "query": "SELECT id, sku, title, lot_policy, updated_at\n      FROM org_products\n      WHERE organization_id = $1 AND sku = $2",
      "status": "pass",
      "rows": [
        {
          "id": "01989ca2-6a54-7834-8376-06a0251bacd8",
          "sku": "SP019N1A",
          "title": "SpeedPatch® PET",
          "lot_policy": "approved",
          "updated_at": "2026-04-23T03:45:56.076Z"
        }
      ],
      "assertion": "Row for SKU SP019N1A should have lot_policy = 'approved'"
    },
    {
      "name": "Product B (FiberLocker) lot_policy = \"any\"",
      "query": "SELECT id, sku, title, lot_policy, updated_at\n      FROM org_products\n      WHERE organization_id = $1 AND sku = $2",
      "status": "pass",
      "rows": [
        {
          "id": "01989ca1-f2f8-7ab7-8269-7179342797cc",
          "sku": "FL516SNA",
          "title": "FiberLocker® Instrument SN",
          "lot_policy": "any",
          "updated_at": "2026-04-23T03:43:54.075Z"
        }
      ],
      "assertion": "Row for SKU FL516SNA should have lot_policy = 'any'"
    },
    {
      "name": "Approved lots saved for Product A",
      "query": "SELECT pal.lot_value, pal.comment, pal.expiration\n      FROM org_product_allowed_lots pal\n      JOIN org_products p ON p.id = pal.org_product_id\n      WHERE p.organization_id = $1 AND p.sku = $2 AND pal.lot_value LIKE 'URS061-%'\n      ORDER BY pal.lot_value",
      "status": "pass",
      "rows": [
        {
          "lot_value": "URS061-BATCH-2025Q1",
          "comment": null,
          "expiration": null
        },
        {
          "lot_value": "URS061-BATCH-2025Q2",
          "comment": null,
          "expiration": null
        }
      ],
      "assertion": "URS061-prefixed allowed-lot rows for SpeedPatch should be exactly URS061-BATCH-2025Q1, URS061-BATCH-2025Q2"
    },
    {
      "name": "Product B has no URS061- allowed lots",
      "query": "SELECT pal.lot_value\n      FROM org_product_allowed_lots pal\n      JOIN org_products p ON p.id = pal.org_product_id\n      WHERE p.organization_id = $1 AND p.sku = $2 AND pal.lot_value LIKE 'URS061-%'",
      "status": "pass",
      "rows": [],
      "assertion": "FiberLocker should have no test-prefixed allowed-lot rows (contrast case)"
    }
  ],
  "overallStatus": "pass",
  "outputDir": "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z",
  "auditStartTime": "2026-04-23T03:43:52.101Z",
  "auditEventEvidence": [
    {
      "createdAt": "2026-04-23T03:43:56.207Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "alex.admin@zurimed.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "alex.admin@zurimed.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:44:03.297Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "alex.admin@zurimed.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "alex.admin@zurimed.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:44:11.251Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "alex.admin@zurimed.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "alex.admin@zurimed.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:44:20.720Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "alex.admin@zurimed.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "alex.admin@zurimed.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:44:27.966Z",
      "eventType": "decision",
      "action": "product.lot_policy.update",
      "userEmail": "alex.admin@zurimed.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01989ca2-6a54-7834-8376-06a0251bacd8",
      "secondaryObjectId": null,
      "payload": {
        "reason": "Product lot policy changed via product settings form",
        "lotPolicy": "approved",
        "performed": true,
        "entityType": "org_product",
        "previousLotPolicy": "any"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-04-23T03:44:32.550Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "alex.admin@zurimed.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "alex.admin@zurimed.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:44:37.961Z",
      "eventType": "decision",
      "action": "product.allowed_lot.add",
      "userEmail": "alex.admin@zurimed.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01989ca2-6a54-7834-8376-06a0251bacd8",
      "secondaryObjectId": null,
      "payload": {
        "reason": "Approved lot value added to product",
        "comment": null,
        "lotValue": "URS061-BATCH-2025Q1",
        "performed": true,
        "entityType": "org_product_allowed_lot",
        "expiration": null
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-04-23T03:44:39.440Z",
      "eventType": "decision",
      "action": "product.allowed_lot.add",
      "userEmail": "alex.admin@zurimed.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01989ca2-6a54-7834-8376-06a0251bacd8",
      "secondaryObjectId": null,
      "payload": {
        "reason": "Approved lot value added to product",
        "comment": null,
        "lotValue": "URS061-BATCH-2025Q2",
        "performed": true,
        "entityType": "org_product_allowed_lot",
        "expiration": null
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-04-23T03:44:44.145Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "alex.admin@zurimed.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "alex.admin@zurimed.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:44:50.871Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "bob.kauffman@stellartech.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "StellarTech Medical Solutions",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "bob.kauffman@stellartech.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:45:07.857Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "alex.admin@zurimed.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "alex.admin@zurimed.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:45:14.408Z",
      "eventType": "decision",
      "action": "product.lot_policy.update",
      "userEmail": "alex.admin@zurimed.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01989ca2-6a54-7834-8376-06a0251bacd8",
      "secondaryObjectId": null,
      "payload": {
        "reason": "Product lot policy changed via product settings form",
        "lotPolicy": "none",
        "performed": true,
        "entityType": "org_product",
        "previousLotPolicy": "approved"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-04-23T03:45:15.706Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "bob.kauffman@stellartech.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "StellarTech Medical Solutions",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "bob.kauffman@stellartech.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:45:28.520Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "alex.admin@zurimed.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "alex.admin@zurimed.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:45:35.066Z",
      "eventType": "decision",
      "action": "product.lot_policy.update",
      "userEmail": "alex.admin@zurimed.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01989ca2-6a54-7834-8376-06a0251bacd8",
      "secondaryObjectId": null,
      "payload": {
        "reason": "Product lot policy changed via product settings form",
        "lotPolicy": "serial",
        "performed": true,
        "entityType": "org_product",
        "previousLotPolicy": "none"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-04-23T03:45:36.468Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "bob.kauffman@stellartech.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "StellarTech Medical Solutions",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "bob.kauffman@stellartech.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:45:49.539Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "alex.admin@zurimed.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "alex.admin@zurimed.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:45:56.074Z",
      "eventType": "decision",
      "action": "product.lot_policy.update",
      "userEmail": "alex.admin@zurimed.com",
      "userId": "f6a7b8c9-d0e1-2345-f123-456789012345",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01989ca2-6a54-7834-8376-06a0251bacd8",
      "secondaryObjectId": null,
      "payload": {
        "reason": "Product lot policy changed via product settings form",
        "lotPolicy": "approved",
        "performed": true,
        "entityType": "org_product",
        "previousLotPolicy": "serial"
      },
      "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 4b: Approved policy saved",
      "expectedAction": "decision:product.lot_policy.update",
      "found": true
    },
    {
      "stepName": "Step 5: Add approved lots",
      "expectedAction": "decision:product.allowed_lot.add",
      "found": true
    },
    {
      "stepName": "Step 8: No Lot policy suppresses lot input",
      "expectedAction": "decision:product.lot_policy.update",
      "found": true
    },
    {
      "stepName": "Step 9: Serial Numbers policy shows serial input",
      "expectedAction": "decision:product.lot_policy.update",
      "found": true
    }
  ],
  "emailAssertions": [],
  "videoPaths": [
    "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/videos/step-04-set-approved-policy.webm",
    "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/videos/step-08a-set-no-lot-policy.webm",
    "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/videos/step-08b-no-lot-order-ui.webm",
    "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/videos/step-09a-set-serial-policy.webm",
    "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/videos/step-09b-serial-order-ui.webm",
    "/Users/jason/projects/casecohort/code/validation_test_results/urs-061-lot-policy-per-product/2026-04-23T03-43-54-022Z/videos/step-09c-restore-approved-policy.webm"
  ]
}