{
  "base_url": "http://127.0.0.1:8108",
  "cases": [
    {
      "case_id": "W13-POS-COUNT-FREEZE-POST",
      "detail": {
        "create": {
          "error": null,
          "http_status": 200,
          "result": {
            "data": {
              "id": 2,
              "name": "SO/2026/0002"
            },
            "message": "Stock opname created",
            "success": true
          }
        },
        "done": {
          "error": null,
          "http_status": 200,
          "result": {
            "message": "Stock opname completed",
            "success": true
          }
        },
        "review": {
          "error": null,
          "http_status": 200,
          "result": {
            "message": "Opname moved to review. Missing items flagged.",
            "success": true,
            "total_missing": 0
          }
        },
        "scan": {
          "error": null,
          "http_status": 200,
          "result": {
            "line_id": 2,
            "status": "found",
            "success": true
          }
        },
        "snapshot": {
          "id": 2,
          "scola_last_counter_uid": 1163,
          "state": "done",
          "total_scanned": 1
        },
        "start": {
          "error": null,
          "http_status": 200,
          "result": {
            "message": "Opname started. 1 items to check.",
            "success": true,
            "total_lines": 1
          }
        }
      },
      "matrix_id": "RT-W13-POS-01",
      "status": "PASS"
    },
    {
      "case_id": "W13-NEG-VIEWER-SELF-POST",
      "detail": {
        "self_done": {
          "error": null,
          "http_status": 200,
          "result": {
            "error": "Counter cannot post an opname session they counted or froze.",
            "success": false
          }
        },
        "snapshot": {
          "id": 3,
          "scola_last_counter_uid": 1163,
          "state": "review",
          "total_scanned": 0
        },
        "viewer_create": {
          "error": null,
          "http_status": 200,
          "result": {
            "capability": "library.circulation.manage",
            "error": "capability_denied",
            "message": "Insufficient permissions for this API route.",
            "path": "/api/v1/library/stock-opname/create",
            "success": false
          }
        },
        "viewer_list": {
          "error": null,
          "http_status": 200,
          "result": {
            "capability": "library.circulation.manage",
            "error": "capability_denied",
            "message": "Insufficient permissions for this API route.",
            "path": "/api/v1/library/stock-opname/list",
            "success": false
          }
        }
      },
      "matrix_id": "RT-W13-NEG-01",
      "status": "PASS"
    },
    {
      "case_id": "W13-SCP-LOCATION-BOUNDARY",
      "detail": {
        "foreign_lines": {
          "error": null,
          "http_status": 200,
          "result": {
            "error": "Uh-oh! Looks like you have stumbled upon some top-secret records.\n\nSorry, W13 Poster (id=1164) doesn't have 'read' access to:\n- Library Stock Opname (op.stock.opname)\n\nIf you really, really need access, perhaps you can win over your friendly administrator with a batch of freshly baked cookies.",
            "success": false
          }
        },
        "line_unit_ids": [
          2
        ],
        "wrong_location_scan": {
          "error": null,
          "http_status": 200,
          "result": {
            "error": "Barcode not in opname location scope"
          }
        }
      },
      "matrix_id": "RT-W13-SCP-01",
      "status": "PASS"
    },
    {
      "case_id": "W13-STA-INVALID-TRANSITIONS",
      "detail": {
        "done_early": {
          "error": null,
          "http_status": 200,
          "result": {
            "error": "Only reviewed opname can be completed.",
            "success": false
          }
        },
        "restart": {
          "error": null,
          "http_status": 200,
          "result": {
            "error": "Only draft opname can be started.",
            "success": false
          }
        }
      },
      "matrix_id": "RT-W13-STA-01",
      "status": "PASS"
    },
    {
      "case_id": "W13-TEN-CROSS-COMPANY",
      "detail": {
        "item_count": 3,
        "t2_leak": false
      },
      "matrix_id": "RT-W13-TEN-01",
      "status": "PASS"
    },
    {
      "case_id": "W13-VAL-INVALID-AND-LATE-EDIT",
      "detail": {
        "duplicate_session": {
          "error": null,
          "http_status": 200,
          "result": {
            "error": "Only one active stock opname session is allowed per warehouse/location.",
            "success": false
          }
        },
        "invalid_scan": {
          "error": null,
          "http_status": 200,
          "result": {
            "error": "Barcode not found: INVALID-W13-BARCODE"
          }
        },
        "late_update": {
          "error": null,
          "http_status": 200,
          "result": {
            "error": "Opname lines cannot be edited after freeze or completion.",
            "success": false
          }
        }
      },
      "matrix_id": "RT-W13-VAL-01",
      "status": "PASS"
    },
    {
      "case_id": "W13-IDM-DOUBLE-POST",
      "detail": {
        "first_done": {
          "error": null,
          "http_status": 200,
          "result": {
            "message": "Stock opname completed",
            "success": true
          }
        },
        "second_done": {
          "error": null,
          "http_status": 200,
          "result": {
            "error": "Only reviewed opname can be completed.",
            "success": false
          }
        },
        "snapshot": {
          "id": 4,
          "scola_last_counter_uid": 1163,
          "state": "done",
          "total_scanned": 0
        }
      },
      "matrix_id": "RT-W13-IDM-01",
      "status": "PASS"
    },
    {
      "case_id": "W13-REC-CANCEL-RESET-RESUME",
      "detail": {
        "create": {
          "error": null,
          "http_status": 200,
          "result": {
            "data": {
              "id": 5,
              "name": "SO/2026/0006"
            },
            "message": "Stock opname created",
            "success": true
          }
        },
        "resume_start": {
          "error": null,
          "http_status": 200,
          "result": {
            "message": "Opname started. 1 items to check.",
            "success": true,
            "total_lines": 1
          }
        },
        "start": {
          "error": null,
          "http_status": 200,
          "result": {
            "message": "Opname started. 1 items to check.",
            "success": true,
            "total_lines": 1
          }
        }
      },
      "matrix_id": "RT-W13-REC-01",
      "status": "PASS"
    },
    {
      "case_id": "W13-XRP-READER-BOUNDARY",
      "detail": {
        "counter_lines": {
          "error": null,
          "http_status": 200,
          "result": {
            "count": 1,
            "data": [
              {
                "barcode": "MUB0000000002",
                "expected": true,
                "id": 4,
                "media_name": "W13 Harness Title 0831T133949Z",
                "media_unit_id": 2,
                "notes": "",
                "scanned": false,
                "scanned_by": "",
                "scanned_date": null,
                "status": "missing"
              }
            ],
            "success": true
          }
        },
        "viewer_lines": {
          "error": null,
          "http_status": 200,
          "result": {
            "capability": "library.circulation.manage",
            "error": "capability_denied",
            "message": "Insufficient permissions for this API route.",
            "path": "/api/v1/library/stock-opname/lines",
            "success": false
          }
        }
      },
      "matrix_id": "RT-W13-XRP-01",
      "status": "PASS"
    },
    {
      "case_id": "W13-XMD-ENTITLEMENT-OFF",
      "detail": {
        "create_off": {
          "error": null,
          "http_status": 200,
          "result": {
            "error": "feature_disabled",
            "feature_flag": "scola_library",
            "message": "Feature is disabled for the current tenant.",
            "path": "/api/v1/library/stock-opname/create",
            "success": false
          }
        }
      },
      "matrix_id": "RT-W13-XMD-01",
      "status": "PASS"
    },
    {
      "case_id": "W13-UIA-API-ALIGNMENT",
      "detail": {
        "list": {
          "error": null,
          "http_status": 200,
          "result": {
            "count": 4,
            "data": [
              {
                "end_date": null,
                "id": 5,
                "location_id": 19,
                "location_name": "W13-LOC-B-0831T133949Z",
                "name": "SO/2026/0006",
                "start_date": "2026-08-31",
                "state": "in_progress",
                "total_expected": 1,
                "total_missing": 0,
                "total_scanned": 0,
                "total_unknown": 0,
                "user_name": "W13 Counter"
              },
              {
                "end_date": "2026-08-31",
                "id": 4,
                "location_id": 18,
                "location_name": "W13-LOC-A-0831T133949Z",
                "name": "SO/2026/0004",
                "start_date": "2026-08-31",
                "state": "done",
                "total_expected": 1,
                "total_missing": 1,
                "total_scanned": 0,
                "total_unknown": 0,
                "user_name": "W13 Counter"
              },
              {
                "end_date": null,
                "id": 3,
                "location_id": 19,
                "location_name": "W13-LOC-B-0831T133949Z",
                "name": "SO/2026/0003",
                "start_date": "2026-08-31",
                "state": "cancelled",
                "total_expected": 1,
                "total_missing": 1,
                "total_scanned": 0,
                "total_unknown": 0,
                "user_name": "W13 Counter"
              },
              {
                "end_date": "2026-08-31",
                "id": 2,
                "location_id": 18,
                "location_name": "W13-LOC-A-0831T133949Z",
                "name": "SO/2026/0002",
                "start_date": "2026-08-31",
                "state": "done",
                "total_expected": 1,
                "total_missing": 0,
                "total_scanned": 1,
                "total_unknown": 0,
                "user_name": "W13 Counter"
              }
            ],
            "success": true
          }
        },
        "route_meta": {
          "capability": "library.circulation.manage",
          "feature_flag": "scola_library",
          "module": null
        }
      },
      "matrix_id": "RT-W13-UIA-01",
      "status": "PASS"
    }
  ],
  "database": "scola_t6g_opname_audit_20260831T133949Z",
  "executed_at": "2026-08-31T13:41:42.950624+00:00",
  "overlay_version": "gt-w13-1.0",
  "schema": "t6g-w13-runtime-v1",
  "summary": {
    "fail": 0,
    "pass": 11,
    "total": 11
  }
}
