{
  "module_name": "auth",
  "module_root": "pypos/modules/auth",
  "effective_date": "2026-04-12",
  "score": {
    "max": 100,
    "pass_score": 90
  },
  "kpis": [
    {
      "id": "KPI-01",
      "name": "Function Budget",
      "weight": 20
    },
    {
      "id": "KPI-02",
      "name": "Exception Hygiene",
      "weight": 25
    },
    {
      "id": "KPI-03",
      "name": "Error Contract",
      "weight": 20
    },
    {
      "id": "KPI-04",
      "name": "Test Maturity",
      "weight": 25
    },
    {
      "id": "KPI-05",
      "name": "Governance Controls",
      "weight": 10
    }
  ],
  "critical_functions": [
    {
      "file_path": "pypos/modules/auth/services/device_registration_service.py",
      "class_name": "DeviceRegistrationService",
      "function_name": "search_store_branches",
      "max_loc": 260
    },
    {
      "file_path": "pypos/modules/auth/services/device_registration_service.py",
      "class_name": "DeviceRegistrationService",
      "function_name": "register_device",
      "max_loc": 260
    }
  ],
  "exception_hygiene": {
    "baseline_generic_exception": 0,
    "max_allowed_generic_exception": 2,
    "min_reduction_pct": 0
  },
  "error_contract_targets": [
    {
      "file_path": "pypos/modules/auth/services/device_registration_service.py",
      "required_tokens": [
        "error_code",
        "reason",
        "trace_id"
      ]
    }
  ],
  "test_matrix": {
    "auth_registration_flow": {
      "files": [
        "tests/test_device_registration_service.py",
        "tests/p1/test_device_registration_request_builder.py",
        "tests/p1/test_device_registration_response_mapper.py"
      ],
      "min_cases": 12
    }
  },
  "governance_checks": [
    {
      "file_path": "pypos/modules/auth/controllers/login_controller.py",
      "required_tokens": [
        "log_audit"
      ]
    }
  ]
}
