{
  "base_url": "http://127.0.0.1:8104",
  "cases": [
    {
      "case_id": "W20-IDM-DUPLICATE-INGEST",
      "detail": {
        "db_event_count": 1,
        "first": {
          "body": {
            "id": null,
            "jsonrpc": "2.0",
            "result": {
              "attendance_id": 170,
              "event_id": "w20_idm_ec95e69d101d",
              "message": "Attendance recorded for GT-T1 Probe Student",
              "processed": true,
              "status": "success"
            }
          },
          "http_status": 200
        },
        "second": {
          "body": {
            "id": null,
            "jsonrpc": "2.0",
            "result": {
              "event_id": "w20_idm_ec95e69d101d",
              "message": "Event already processed (idempotent)",
              "status": "duplicate"
            }
          },
          "http_status": 200
        }
      },
      "matrix_id": "RT-W20-IDM-01",
      "status": "PASS"
    },
    {
      "case_id": "W20-STA-RETRY-STATE-MATRIX",
      "detail": {
        "after_first": {
          "attendance_count_student": 1,
          "attendance_line_id": 170,
          "error_message": null,
          "event_id": "w20_fail_0831T104024Z",
          "id": 2,
          "processed": true,
          "state": "duplicate"
        },
        "after_second": {
          "attendance_count_student": 1,
          "attendance_line_id": 170,
          "error_message": null,
          "event_id": "w20_fail_0831T104024Z",
          "id": 2,
          "processed": true,
          "state": "duplicate"
        },
        "before": {
          "attendance_count_student": 1,
          "attendance_line_id": null,
          "error_message": "Harness simulated processor failure",
          "event_id": "w20_fail_0831T104024Z",
          "id": 2,
          "processed": true,
          "state": "error"
        },
        "first_retry": {
          "error": null,
          "http_status": 200,
          "result": {
            "message": "Event reprocessed successfully",
            "new_status": "duplicate",
            "success": true
          }
        },
        "second_retry": {
          "error": null,
          "http_status": 200,
          "result": {
            "error": "Event is not in a retryable state",
            "success": false
          }
        }
      },
      "matrix_id": "RT-W20-STA-01",
      "status": "PASS"
    },
    {
      "case_id": "W20-REC-FAILED-RETRY-ONCE",
      "detail": {
        "after_first": {
          "attendance_count_student": 1,
          "attendance_line_id": 170,
          "error_message": null,
          "event_id": "w20_fail_0831T104024Z",
          "id": 2,
          "processed": true,
          "state": "duplicate"
        },
        "after_second": {
          "attendance_count_student": 1,
          "attendance_line_id": 170,
          "error_message": null,
          "event_id": "w20_fail_0831T104024Z",
          "id": 2,
          "processed": true,
          "state": "duplicate"
        },
        "attendance_after_first": 1,
        "attendance_after_second": 1,
        "attendance_before": 1,
        "first_retry": {
          "error": null,
          "http_status": 200,
          "result": {
            "message": "Event reprocessed successfully",
            "new_status": "duplicate",
            "success": true
          }
        },
        "second_retry": {
          "error": null,
          "http_status": 200,
          "result": {
            "error": "Event is not in a retryable state",
            "success": false
          }
        }
      },
      "matrix_id": "RT-W20-REC-01",
      "status": "PASS"
    },
    {
      "case_id": "W20-POS-INGEST-HAPPY",
      "detail": {
        "body": {
          "id": null,
          "jsonrpc": "2.0",
          "result": {
            "attendance_id": 170,
            "event_id": "w20_evt_4a0e73e00186",
            "message": "Attendance recorded for GT-T1 Probe Student",
            "processed": true,
            "status": "success"
          }
        },
        "event_id": "w20_evt_4a0e73e00186",
        "http_status": 200
      },
      "matrix_id": "RT-W20-POS-01",
      "status": "PASS"
    },
    {
      "case_id": "W20-NEG-VIEWER-DENY",
      "detail": {
        "list": {
          "body": {
            "capability": "students.rfid_config.view",
            "error": "capability_denied",
            "message": "Insufficient permissions for this API route.",
            "path": "/api/rfid/events",
            "success": false
          },
          "http_status": 403
        },
        "retry": {
          "error": null,
          "http_status": 200,
          "result": {
            "capability": "students.rfid_config.view",
            "error": "capability_denied",
            "message": "Insufficient permissions for this API route.",
            "path": "/api/rfid/events/1/retry",
            "success": false
          }
        }
      },
      "matrix_id": "RT-W20-NEG-01",
      "status": "PASS"
    },
    {
      "case_id": "W20-VAL-MISSING-SIGNATURE",
      "detail": {
        "body": {
          "id": null,
          "jsonrpc": "2.0",
          "result": {
            "error_code": "MISSING_SIGNATURE",
            "message": "X-Signature header is required",
            "status": "error"
          }
        },
        "http_status": 200
      },
      "matrix_id": "RT-W20-VAL-01",
      "status": "PASS"
    },
    {
      "case_id": "W20-SCP-FOREIGN-OWNERSHIP",
      "detail": {
        "cross_ingest": {
          "body": {
            "id": null,
            "jsonrpc": "2.0",
            "result": {
              "error_code": "UNKNOWN_CARD",
              "message": "Card not registered or inactive",
              "status": "error"
            }
          },
          "http_status": 200
        },
        "foreign_in_device_list": false,
        "foreign_regen": {
          "error": null,
          "http_status": 200,
          "result": {
            "error": "Device not found",
            "success": false
          }
        },
        "foreign_retry": {
          "error": null,
          "http_status": 200,
          "result": {
            "error": "Event not found",
            "success": false
          }
        }
      },
      "matrix_id": "RT-W20-SCP-01",
      "status": "PASS"
    },
    {
      "case_id": "W20-TEN-CROSS-COMPANY",
      "detail": {
        "cross_ingest_error": "UNKNOWN_CARD",
        "leaked_t2_event": false,
        "manager_events_http": 200,
        "t2_attendance_after_cross": 0,
        "t2_attendance_before": 0
      },
      "matrix_id": "RT-W20-TEN-01",
      "status": "PASS"
    },
    {
      "case_id": "W20-XRP-READER-BOUNDARY",
      "detail": {
        "failed_before_retry_attendance": null,
        "list_pos_attendance_id": 170,
        "manager_events_success": true,
        "parent_denied": true,
        "parent_events_http": 403,
        "pos_attendance_from_ingest": 170,
        "pos_event_in_manager_list": true,
        "student_denied": true,
        "student_events_http": 403,
        "t2_failed_attendance_id": null
      },
      "matrix_id": "RT-W20-XRP-01",
      "status": "PASS"
    },
    {
      "case_id": "W20-UIA-API-ALIGNMENT",
      "detail": {
        "events_shape_ok": true,
        "on_events_http": 200,
        "package_off_devices": {
          "body": {
            "error": "feature_disabled",
            "feature_flag": "scola_smart_attendance",
            "message": "Feature is disabled for the current tenant.",
            "path": "/api/rfid/devices",
            "success": false
          },
          "http_status": 403
        },
        "route_meta": {
          "capability": "students.rfid_config.view",
          "feature_flag": "scola_smart_attendance",
          "module": null
        },
        "secrets_exposed_in_device_list": false
      },
      "matrix_id": "RT-W20-UIA-01",
      "status": "PASS"
    },
    {
      "case_id": "W20-XMD-ENTITLEMENT-OFF",
      "detail": {
        "body": {
          "error": "feature_disabled",
          "feature_flag": "scola_smart_attendance",
          "message": "Feature is disabled for the current tenant.",
          "path": "/api/rfid/events",
          "success": false
        },
        "http_status": 403
      },
      "matrix_id": "RT-W20-XMD-01",
      "status": "PASS"
    }
  ],
  "database": "scola_t6i_rfid_audit_20260831T104024Z",
  "executed_at": "2026-08-31T10:41:39.873372+00:00",
  "overlay_version": "gt-w20-3.0",
  "schema": "t6i-w20-runtime-v1",
  "summary": {
    "fail": 0,
    "pass": 11,
    "total": 11
  }
}
