[
  {
    "key": "trust_score",
    "title": "Trust Score",
    "data": {
      "schema_version": "1.0",
      "generated_at": "2026-11-05T21:38:48.466825+00:00",
      "org_average_trust_score": 47.5,
      "models_with_insufficient_data": 0,
      "weights_used": {
        "fairness": 0.4,
        "drift": 0.3,
        "explainability": 0.3
      },
      "methodology_note": "Trust Score = weighted average of fairness (bias audit), drift severity, and explainability coverage, renormalized over whichever inputs are available for a model. Models with none of the three inputs are excluded from the score and counted separately.",
      "models": [
        {
          "model_id": "fb32c0b5-a1c7-537b-a4bc-f6b881e2095d",
          "model_name": "loan-approval-sample",
          "trust_score": 47.5,
          "fairness_component": 100.0,
          "drift_component": 25.0,
          "explainability_component": 0.0
        }
      ]
    }
  },
  {
    "key": "risk_register",
    "title": "Risk Register",
    "data": {
      "schema_version": "1.0",
      "generated_at": "2026-11-05T21:38:48.472829+00:00",
      "open_risk_count": 1,
      "high_or_critical_open_count": 1,
      "entries": [
        {
          "title": "High-severity drift detected \u2014 loan-approval-sample",
          "category": "drift",
          "severity": "high",
          "risk_score": 12,
          "status": "identified",
          "owner_id": null,
          "mitigation_plan": null,
          "target_resolution_date": null,
          "source_type": "drift_report",
          "iso42001_clause_refs": [
            "ISO42001-8.2",
            "ISO42001-9.1"
          ],
          "created_at": "2026-11-05T21:38:37.572146+00:00"
        }
      ]
    }
  },
  {
    "key": "compliance",
    "title": "Compliance",
    "data": {
      "schema_version": "1.0",
      "generated_at": "2026-11-05T21:38:48.487822+00:00",
      "organization_id": "1fd41d4c-b016-5f96-bb29-3d2a20d2949b",
      "organization_name": "Sample Lending Co. (synthetic)",
      "period_start": "2026-09-21T21:43:45.765765",
      "period_end": "2026-11-05T21:43:45.765765",
      "audit_statistics": {
        "total_events": 9,
        "events_by_category": {
          "compliance": 5,
          "model_operation": 3,
          "report": 1
        },
        "events_by_severity": {
          "INFO": 9
        },
        "events_by_status": {
          "success": 9
        },
        "events_by_user": [
          {
            "user_id": "c7b1ec40-b201-52ae-9757-c39d81b9fad6",
            "username": "riley@sample-lending.example",
            "event_count": 5
          },
          {
            "user_id": "1d8fd766-a43a-5c7b-baa1-d398ee5d9e34",
            "username": "sam@sample-lending.example",
            "event_count": 2
          },
          {
            "user_id": "ca0ff3eb-6e38-52b0-b6c9-790552fbacfa",
            "username": "morgan@sample-lending.example",
            "event_count": 1
          }
        ]
      },
      "audit_chain_integrity": {
        "total_logs_checked": 9,
        "valid_logs": 9,
        "invalid_logs": 0,
        "broken_chains": 0,
        "integrity_percentage": 100.0,
        "verified": true
      },
      "gdpr_data_subject_request_count": 0,
      "open_risk_count": 1,
      "open_risk_count_by_severity": {
        "high": 1
      },
      "critical_risk_count": 0
    }
  },
  {
    "key": "model_performance",
    "title": "Model Performance",
    "data": {
      "schema_version": "1.0",
      "generated_at": "2026-11-05T21:38:48.490824+00:00",
      "model_id": "fb32c0b5-a1c7-537b-a4bc-f6b881e2095d",
      "model_name": "loan-approval-sample",
      "period_start": "2026-09-21T21:43:45.765765",
      "period_end": "2026-11-05T21:43:45.765765",
      "overall_metrics": {
        "accuracy": {
          "latest": 0.6733333333333333,
          "average": 0.6733333333333333,
          "sample_count": 1
        },
        "f1_score": {
          "latest": 0.7393617021276596,
          "average": 0.7393617021276596,
          "sample_count": 1
        },
        "auc_roc": {
          "latest": 0.724214655182301,
          "average": 0.724214655182301,
          "sample_count": 1
        }
      },
      "metrics_timeline": [
        {
          "metric_type": "accuracy",
          "metric_name": "accuracy",
          "value": 0.6733333333333333,
          "recorded_at": "2026-11-05T21:38:37.447649+00:00"
        },
        {
          "metric_type": "f1_score",
          "metric_name": "f1_score",
          "value": 0.7393617021276596,
          "recorded_at": "2026-11-05T21:38:37.466648+00:00"
        },
        {
          "metric_type": "auc_roc",
          "metric_name": "auc_roc",
          "value": 0.724214655182301,
          "recorded_at": "2026-11-05T21:38:37.474654+00:00"
        }
      ],
      "baseline_comparison": null
    }
  },
  {
    "key": "drift_analysis",
    "title": "Drift Analysis",
    "data": {
      "schema_version": "1.0",
      "generated_at": "2026-11-05T21:38:48.496822+00:00",
      "model_id": "fb32c0b5-a1c7-537b-a4bc-f6b881e2095d",
      "model_name": "loan-approval-sample",
      "period_start": "2026-09-21T21:43:45.765765",
      "period_end": "2026-11-05T21:43:45.765765",
      "data_drift": {
        "model_id": "fb32c0b5-a1c7-537b-a4bc-f6b881e2095d",
        "start_date": "2026-09-21T21:43:45.765765",
        "end_date": "2026-11-05T21:43:45.765765",
        "data_points": [
          {
            "timestamp": "2026-11-05T21:38:37.478501+00:00",
            "drift_score": 0.7982594035701802,
            "features_with_drift": 2,
            "severity": "high"
          }
        ],
        "trend_direction": "stable"
      },
      "concept_drift": {
        "model_id": "fb32c0b5-a1c7-537b-a4bc-f6b881e2095d",
        "trend_direction": "stable",
        "performance_trend": [],
        "confidence_trend": [],
        "severity_distribution": {},
        "drift_frequency": 0,
        "total_reports": 0
      },
      "latest_feature_results": {
        "report_id": "a889273d-cbbc-4225-826d-64e8f9595f29",
        "checked_at": "2026-11-05T21:38:37.478501+00:00",
        "samples_analyzed": 1200,
        "features_tested": 6,
        "drifted_features": [
          "annual_income",
          "credit_utilization"
        ],
        "tests": [
          {
            "feature_name": "loan_amount",
            "feature_type": "numerical",
            "test": "Kolmogorov-Smirnov",
            "statistic": 0.03333333333333333,
            "p_value": 0.8931639596549428,
            "drift_detected": false
          },
          {
            "feature_name": "loan_amount",
            "feature_type": "numerical",
            "test": "Jensen-Shannon",
            "statistic": 0.056337402258425415,
            "p_value": null,
            "drift_detected": false
          },
          {
            "feature_name": "loan_amount",
            "feature_type": "numerical",
            "test": "PSI",
            "statistic": 0.048907393827139656,
            "p_value": null,
            "drift_detected": false
          },
          {
            "feature_name": "annual_income",
            "feature_type": "numerical",
            "test": "Kolmogorov-Smirnov",
            "statistic": 0.18,
            "p_value": 6.5963164281302544e-09,
            "drift_detected": true
          },
          {
            "feature_name": "annual_income",
            "feature_type": "numerical",
            "test": "Jensen-Shannon",
            "statistic": 0.12555912149098727,
            "p_value": null,
            "drift_detected": true
          },
          {
            "feature_name": "annual_income",
            "feature_type": "numerical",
            "test": "PSI",
            "statistic": 0.19635944768515096,
            "p_value": null,
            "drift_detected": false
          },
          {
            "feature_name": "debt_to_income",
            "feature_type": "numerical",
            "test": "Kolmogorov-Smirnov",
            "statistic": 0.04666666666666667,
            "p_value": 0.5310820424048986,
            "drift_detected": false
          },
          {
            "feature_name": "debt_to_income",
            "feature_type": "numerical",
            "test": "Jensen-Shannon",
            "statistic": 0.07548780276581821,
            "p_value": null,
            "drift_detected": false
          },
          {
            "feature_name": "debt_to_income",
            "feature_type": "numerical",
            "test": "PSI",
            "statistic": 0.04721308809789635,
            "p_value": null,
            "drift_detected": false
          },
          {
            "feature_name": "months_employed",
            "feature_type": "numerical",
            "test": "Kolmogorov-Smirnov",
            "statistic": 0.051666666666666666,
            "p_value": 0.4000916349094469,
            "drift_detected": false
          },
          {
            "feature_name": "months_employed",
            "feature_type": "numerical",
            "test": "Jensen-Shannon",
            "statistic": 0.057062490932840715,
            "p_value": null,
            "drift_detected": false
          },
          {
            "feature_name": "months_employed",
            "feature_type": "numerical",
            "test": "PSI",
            "statistic": 0.02662477026307413,
            "p_value": null,
            "drift_detected": false
          },
          {
            "feature_name": "recent_inquiries",
            "feature_type": "categorical",
            "test": "Chi-squared",
            "statistic": 8.00481039929288,
            "p_value": 0.15597071622756464,
            "drift_detected": false
          },
          {
            "feature_name": "recent_inquiries",
            "feature_type": "categorical",
            "test": "PSI",
            "statistic": 0.015137040412450039,
            "p_value": null,
            "drift_detected": false
          },
          {
            "feature_name": "credit_utilization",
            "feature_type": "numerical",
            "test": "Kolmogorov-Smirnov",
            "statistic": 0.24833333333333332,
            "p_value": 1.1908107708806584e-16,
            "drift_detected": true
          },
          {
            "feature_name": "credit_utilization",
            "feature_type": "numerical",
            "test": "Jensen-Shannon",
            "statistic": 0.26079895985477075,
            "p_value": null,
            "drift_detected": true
          },
          {
            "feature_name": "credit_utilization",
            "feature_type": "numerical",
            "test": "PSI",
            "statistic": 0.8843976275291449,
            "p_value": null,
            "drift_detected": true
          }
        ]
      }
    }
  },
  {
    "key": "bias_audit",
    "title": "Bias Audit",
    "data": {
      "schema_version": "1.0",
      "generated_at": "2026-11-05T21:38:48.504823+00:00",
      "model_id": "fb32c0b5-a1c7-537b-a4bc-f6b881e2095d",
      "model_name": "loan-approval-sample",
      "period_start": "2026-09-21T21:43:45.765765",
      "period_end": "2026-11-05T21:43:45.765765",
      "audit_count": 1,
      "audits": [
        {
          "audit_id": "652c42ab-a376-4d91-82a0-38675851d3de",
          "model_id": "fb32c0b5-a1c7-537b-a4bc-f6b881e2095d",
          "audit_date": "2026-11-05T21:38:42.252110",
          "summary": {
            "overall_fairness_score": 1.0,
            "bias_detected": false,
            "max_severity": "none",
            "total_metrics": 4,
            "failing_metrics": 0
          },
          "fairness_metrics": [
            {
              "metric_type": "demographic_parity",
              "sensitive_attribute": "combined",
              "value": 0.05523189659096084,
              "threshold": 0.1,
              "is_fair": true,
              "severity": "none",
              "description": "Maximum selection rate difference: 0.055"
            },
            {
              "metric_type": "equal_opportunity",
              "sensitive_attribute": "combined",
              "value": 0.033267651888341465,
              "threshold": 0.1,
              "is_fair": true,
              "severity": "none",
              "description": "Maximum TPR difference: 0.033"
            },
            {
              "metric_type": "equalized_odds",
              "sensitive_attribute": "combined",
              "value": 0.058591867902212685,
              "threshold": 0.1,
              "is_fair": true,
              "severity": "none",
              "description": "Average TPR/FPR difference: 0.059"
            },
            {
              "metric_type": "disparate_impact",
              "sensitive_attribute": "combined",
              "value": 0.9207406681689037,
              "threshold": 0.8,
              "is_fair": true,
              "severity": "none",
              "description": "Minimum disparate impact ratio: 0.921"
            }
          ],
          "group_comparisons": [
            {
              "group1": "age_40_and_over",
              "group2": "age_under_40",
              "metric_type": "demographic_parity",
              "value1": 0.6416184971098265,
              "value2": 0.6968503937007874,
              "ratio": 1.0860821451372633,
              "difference": 0.05523189659096084,
              "is_fair": true,
              "severity": "none"
            },
            {
              "group1": "age_40_and_over",
              "group2": "age_under_40",
              "metric_type": "equal_opportunity",
              "value1": 0.7733990147783252,
              "value2": 0.8066666666666666,
              "ratio": 1.0430148619957536,
              "difference": 0.033267651888341465,
              "is_fair": true,
              "severity": "none"
            },
            {
              "group1": "age_40_and_over",
              "group2": "age_under_40",
              "metric_type": "disparate_impact",
              "value1": 0.6416184971098265,
              "value2": 0.6968503937007874,
              "ratio": 1.0860821451372633,
              "difference": 0.05523189659096084,
              "is_fair": true,
              "severity": "none"
            }
          ],
          "recommendations": [
            "\u2713 No significant bias detected. Continue monitoring model performance regularly.",
            "\u2192 Best practice: Conduct periodic bias audits (monthly/quarterly) to ensure continued fairness."
          ]
        }
      ],
      "failing_metrics_summary": [
        {
          "metric_type": "demographic_parity",
          "total_count": 1,
          "failure_count": 0,
          "failure_rate": 0.0
        },
        {
          "metric_type": "equal_opportunity",
          "total_count": 1,
          "failure_count": 0,
          "failure_rate": 0.0
        },
        {
          "metric_type": "equalized_odds",
          "total_count": 1,
          "failure_count": 0,
          "failure_rate": 0.0
        },
        {
          "metric_type": "disparate_impact",
          "total_count": 1,
          "failure_count": 0,
          "failure_rate": 0.0
        }
      ]
    }
  },
  {
    "key": "explainability",
    "title": "Explainability",
    "data": {
      "schema_version": "1.0",
      "generated_at": "2026-11-05T21:38:48.530824+00:00",
      "model_id": "fb32c0b5-a1c7-537b-a4bc-f6b881e2095d",
      "model_name": "loan-approval-sample",
      "period_start": "2026-09-21T21:43:45.765765",
      "period_end": "2026-11-05T21:43:45.765765",
      "total_explanations": 200,
      "by_method": {
        "shap_tree": 200
      },
      "by_status": {
        "completed": 200
      },
      "avg_computation_time_ms": 13.01085352897644,
      "global_attribution": {
        "statistic": "mean_absolute_shap_value",
        "explanations_used": 200,
        "illustrative_excluded": 0,
        "methods": [
          "shap_tree"
        ],
        "features_total": 6,
        "mean_abs_total": 1.6648568859840218,
        "features": [
          {
            "feature": "annual_income",
            "mean_abs_shap": 0.4611693587373825,
            "mean_shap": -0.012906314926815701
          },
          {
            "feature": "credit_utilization",
            "mean_abs_shap": 0.2988059027808254,
            "mean_shap": -0.03720197373314294
          },
          {
            "feature": "debt_to_income",
            "mean_abs_shap": 0.2885749476965633,
            "mean_shap": 0.020409928460034994
          },
          {
            "feature": "recent_inquiries",
            "mean_abs_shap": 0.23470497884778294,
            "mean_shap": 0.12310383769073523
          },
          {
            "feature": "months_employed",
            "mean_abs_shap": 0.230836648748396,
            "mean_shap": -0.003216873811045656
          },
          {
            "feature": "loan_amount",
            "mean_abs_shap": 0.15076504917307176,
            "mean_shap": -0.04195940632360874
          }
        ]
      }
    }
  }
]
