{
  "module_name": "penjualan",
  "module_root": "pypos/modules/penjualan",
  "effective_date": "2026-04-13",
  "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": 5
    },
    {
      "id": "KPI-06",
      "name": "Structural Health",
      "weight": 5
    }
  ],
  "critical_functions": [
    {
      "file_path": "pypos/modules/penjualan/services/transaksi_simpan_use_case_service.py",
      "class_name": "TransaksiSimpanUseCaseService",
      "function_name": "execute",
      "max_loc": 90
    },
    {
      "file_path": "pypos/modules/penjualan/services/transaksi_persist_flow_service.py",
      "class_name": "TransaksiPersistFlowService",
      "function_name": "persist",
      "max_loc": 70
    },
    {
      "file_path": "pypos/modules/penjualan/services/transaksi_penjualan_hotspot_use_case_service.py",
      "class_name": "TransaksiPenjualanHotspotUseCaseService",
      "function_name": "run_async_settlement_status_check",
      "max_loc": 95
    },
    {
      "file_path": "pypos/modules/penjualan/services/transaksi_penjualan_hotspot_use_case_service.py",
      "class_name": "TransaksiPenjualanHotspotUseCaseService",
      "function_name": "handle_jumlah_berubah",
      "max_loc": 75
    }
  ],
  "exception_hygiene": {
    "baseline_generic_exception": 51,
    "max_allowed_generic_exception": 40,
    "min_reduction_pct": 20
  },
  "error_contract_targets": [
    {
      "file_path": "pypos/modules/penjualan/services/error_envelope_service.py",
      "required_tokens": [
        "error_code",
        "reason",
        "trace_id"
      ]
    }
  ],
  "test_matrix": {
    "penjualan_critical": {
      "files": [
        "tests/test_transaksi_persist_flow_service.py",
        "tests/test_transaksi_enterprise_control_service.py",
        "tests/test_penjualan_quality_guard.py"
      ],
      "min_cases": 20
    }
  },
  "governance_checks": [
    {
      "file_path": "pypos/modules/penjualan/services/transaksi_enterprise_control_service.py",
      "required_tokens": [
        "transaksi_idempotency",
        "run_reconciliation",
        "purge_retention"
      ]
    }
  ],
  "structural_health": {
    "max_file_loc": 2750,
    "max_files_over_1500": 4,
    "max_service_to_controller_imports": 0,
    "max_model_to_upper_layer_imports": 0,
    "max_view_to_upper_layer_imports": 0
  }
}
